summaryrefslogtreecommitdiff
path: root/networking/ping.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-10-20 02:00:49 +0000
committerDenis Vlasenko2007-10-20 02:00:49 +0000
commit2edbc2ab85b96fb01a3862db09df12f40d4382cd (patch)
tree0637a680a89fb11a986e59657875adda2546ec18 /networking/ping.c
parentaa7a888e423fc85daa8af0ac3aabe8fc7af86312 (diff)
downloadbusybox-2edbc2ab85b96fb01a3862db09df12f40d4382cd.zip
busybox-2edbc2ab85b96fb01a3862db09df12f40d4382cd.tar.gz
ping: fix breakage from -I fix
passwd: SELinux support by KaiGai Kohei <kaigai@ak.jp.nec.com>
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 bd98a21..0de1b33 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -540,7 +540,7 @@ static void ping4(len_and_sockaddr *lsa)
xbind(pingsock, &source_lsa->sa, source_lsa->len);
}
if (opt_I)
- setsockopt(pingsock, SOL_SOCKET, SO_BINDTODEVICE, device, strlen(opt_I) + 1);
+ setsockopt(pingsock, SOL_SOCKET, SO_BINDTODEVICE, opt_I, strlen(opt_I) + 1);
/* enable broadcast pings */
setsockopt_broadcast(pingsock);
@@ -589,7 +589,7 @@ static void ping6(len_and_sockaddr *lsa)
if (source_lsa)
xbind(pingsock, &source_lsa->sa, source_lsa->len);
if (opt_I)
- setsockopt(pingsock, SOL_SOCKET, SO_BINDTODEVICE, device, strlen(opt_I) + 1);
+ setsockopt(pingsock, SOL_SOCKET, SO_BINDTODEVICE, opt_I, strlen(opt_I) + 1);
#ifdef ICMP6_FILTER
{