summaryrefslogtreecommitdiff
path: root/networking/ping.c
diff options
context:
space:
mode:
authorDenis Vlasenko2008-12-10 11:12:16 +0000
committerDenis Vlasenko2008-12-10 11:12:16 +0000
commite53738558f2f1aa8cd536545479ab98b0df808c5 (patch)
tree187265ed8377d2eee805dc7cc6b9150774804805 /networking/ping.c
parent0d94820adf87b752c338c194a7291dcf1b96fc76 (diff)
downloadbusybox-e53738558f2f1aa8cd536545479ab98b0df808c5.zip
busybox-e53738558f2f1aa8cd536545479ab98b0df808c5.tar.gz
*: fix SO_BINDTODEVICE. Kernel wants at least IFNAMSIZ bytes there.
Diffstat (limited to 'networking/ping.c')
-rw-r--r--networking/ping.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/ping.c b/networking/ping.c
index 01a9f9a..f2a612f 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -572,7 +572,7 @@ static void ping4(len_and_sockaddr *lsa)
xbind(pingsock, &source_lsa->u.sa, source_lsa->len);
}
if (str_I)
- setsockopt(pingsock, SOL_SOCKET, SO_BINDTODEVICE, str_I, strlen(str_I) + 1);
+ setsockopt_bindtodevice(pingsock, str_I);
/* enable broadcast pings */
setsockopt_broadcast(pingsock);
@@ -622,7 +622,7 @@ static void ping6(len_and_sockaddr *lsa)
if (source_lsa)
xbind(pingsock, &source_lsa->u.sa, source_lsa->len);
if (str_I)
- setsockopt(pingsock, SOL_SOCKET, SO_BINDTODEVICE, str_I, strlen(str_I) + 1);
+ setsockopt_bindtodevice(pingsock, str_I);
#ifdef ICMP6_FILTER
{