summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-01-29 01:51:33 +0000
committerErmal Luçi <eri@pfsense.org>2010-01-29 01:51:33 +0000
commit5630c91c21c0178ef97e7b382666dc2d6933cd31 (patch)
treec41895eed9417ec3628b1ab639a4426a2c519838 /etc/inc
parente227df57506b438e96a193c247dda4222400d09a (diff)
downloadpfsense-5630c91c21c0178ef97e7b382666dc2d6933cd31.zip
pfsense-5630c91c21c0178ef97e7b382666dc2d6933cd31.tar.gz
Ticket #275. Run the arp deletion command only if and interface exists and on those types which makes sense.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/interfaces.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 526ef98..9636a78 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -778,7 +778,6 @@ function interface_bring_down($interface = "wan", $destroy = false) {
$realif = get_real_interface($interface);
- mwexec("/usr/sbin/arp -d -i {$realif} -a");
/* remove interface up file if it exists */
unlink_if_exists("{$g['tmp_path']}/{$realif}up");
@@ -814,12 +813,14 @@ function interface_bring_down($interface = "wan", $destroy = false) {
if(does_interface_exist("$realif")) {
mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " delete", true);
mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " down");
+ mwexec("/usr/sbin/arp -d -i {$realif} -a");
}
break;
default:
if(does_interface_exist("$realif")) {
mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " delete", true);
mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " down");
+ mwexec("/usr/sbin/arp -d -i {$realif} -a");
}
break;
}
OpenPOWER on IntegriCloud