Commit f252e7d0 authored by Mike Hibler's avatar Mike Hibler

Fix code for deleting all ARP entries.

parent da23e3ef
......@@ -2366,14 +2366,17 @@ sub os_removearpentry($;$)
# Do it the hard way!
#
if (!defined($ip)) {
my %info = os_getarpinfo($iface);
my $err = 0;
foreach my $_ip (keys %arpinfo) {
if (system("$ARP -i $iface -d $_ip >/dev/null 2>&1")) {
$err++;
my %info = ();
if (!os_getarpinfo($iface, \%info)) {
my $err = 0;
foreach my $_ip (keys %info) {
if (system("$ARP -i $iface -d $_ip >/dev/null 2>&1")) {
$err++;
}
}
return $err;
}
return $err;
return 0;
}
return system("$ARP -i $iface -d $ip >/dev/null 2>&1");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment