diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-03-10 10:16:26 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-03-10 10:16:26 -0300 |
commit | 9aa6ad5c1669b044657b6c6808fae5174ff87460 (patch) | |
tree | 4c7d1efe2266c15756ef5959413b339cfa4322d0 /etc | |
parent | 29b3dd4fb91bbceacec7548dd9a154cd1fa987d6 (diff) | |
download | pfsense-9aa6ad5c1669b044657b6c6808fae5174ff87460.zip pfsense-9aa6ad5c1669b044657b6c6808fae5174ff87460.tar.gz |
pfSense_interface_deladdress() only knows how to delete an ip address, not a subnet. It should fix #3513
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 284dbff..2102121 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2876,8 +2876,14 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven foreach ($tmpifaces as $tmpiface) { if (strstr($iface, ":")) mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " inet6 {$tmpiface} delete"); - else - pfSense_interface_deladdress($realif, $tmpiface); + else { + if (is_subnetv4($tmpiface)) { + $tmpip = explode('/', $tmpiface); + $tmpip = $tmpip[0]; + } else + $tmpip = $tmpiface; + pfSense_interface_deladdress($realif, $tmpip); + } } } |