summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-03-10 10:16:26 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-03-10 10:16:26 -0300
commit9aa6ad5c1669b044657b6c6808fae5174ff87460 (patch)
tree4c7d1efe2266c15756ef5959413b339cfa4322d0
parent29b3dd4fb91bbceacec7548dd9a154cd1fa987d6 (diff)
downloadpfsense-9aa6ad5c1669b044657b6c6808fae5174ff87460.zip
pfsense-9aa6ad5c1669b044657b6c6808fae5174ff87460.tar.gz
pfSense_interface_deladdress() only knows how to delete an ip address, not a subnet. It should fix #3513
-rw-r--r--etc/inc/interfaces.inc10
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);
+ }
}
}
OpenPOWER on IntegriCloud