diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-01-29 01:51:33 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-01-29 01:51:33 +0000 |
commit | 5630c91c21c0178ef97e7b382666dc2d6933cd31 (patch) | |
tree | c41895eed9417ec3628b1ab639a4426a2c519838 /etc/inc | |
parent | e227df57506b438e96a193c247dda4222400d09a (diff) | |
download | pfsense-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.inc | 3 |
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; } |