diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-10 11:12:16 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-10 11:12:16 +0000 |
commit | e53738558f2f1aa8cd536545479ab98b0df808c5 (patch) | |
tree | 187265ed8377d2eee805dc7cc6b9150774804805 /networking/udhcp | |
parent | 0d94820adf87b752c338c194a7291dcf1b96fc76 (diff) | |
download | busybox-w32-e53738558f2f1aa8cd536545479ab98b0df808c5.tar.gz busybox-w32-e53738558f2f1aa8cd536545479ab98b0df808c5.tar.bz2 busybox-w32-e53738558f2f1aa8cd536545479ab98b0df808c5.zip |
*: fix SO_BINDTODEVICE. Kernel wants at least IFNAMSIZ bytes there.
Diffstat (limited to 'networking/udhcp')
-rw-r--r-- | networking/udhcp/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c index 857f0a4de..fdb558db4 100644 --- a/networking/udhcp/socket.c +++ b/networking/udhcp/socket.c | |||
@@ -98,8 +98,8 @@ int FAST_FUNC udhcp_listen_socket(/*uint32_t ip,*/ int port, const char *inf) | |||
98 | bb_perror_msg_and_die("SO_BROADCAST"); | 98 | bb_perror_msg_and_die("SO_BROADCAST"); |
99 | 99 | ||
100 | /* NB: bug 1032 says this doesn't work on ethernet aliases (ethN:M) */ | 100 | /* NB: bug 1032 says this doesn't work on ethernet aliases (ethN:M) */ |
101 | if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &inf, strlen(inf) + 1) == -1) | 101 | if (setsockopt_bindtodevice(fd, inf)) |
102 | bb_perror_msg_and_die("SO_BINDTODEVICE"); | 102 | xfunc_die(); /* warning is already printed */ |
103 | 103 | ||
104 | memset(&addr, 0, sizeof(addr)); | 104 | memset(&addr, 0, sizeof(addr)); |
105 | addr.sin_family = AF_INET; | 105 | addr.sin_family = AF_INET; |