diff options
author | Ermal <eri@pfsense.org> | 2010-04-27 21:31:46 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-04-27 21:31:46 +0000 |
commit | fa4a331fa5660c8d817ca8708696e0478fbb675a (patch) | |
tree | b7f4b92697ccc02440ea98404f001a7b2c8f0767 | |
parent | 461c0a1a4dde2b3ae1e350db581d1837554eb515 (diff) | |
download | pfsense-fa4a331fa5660c8d817ca8708696e0478fbb675a.zip pfsense-fa4a331fa5660c8d817ca8708696e0478fbb675a.tar.gz |
Ticket #471. Bring up the removed/unassigned interface correctly if it is parent to other interfaces, as vlans.
-rw-r--r-- | etc/inc/interfaces.inc | 9 | ||||
-rwxr-xr-x | usr/local/www/interfaces_assign.php | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index e2166c0..edf92dd 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -2798,16 +2798,11 @@ function link_interface_to_vlans($int, $action = "") { if (empty($int)) return; - $real_if = get_real_interface($int); if (is_array($config['vlans']['vlan'])) { foreach ($config['vlans']['vlan'] as $vlan) { - if ($real_if == $vlan['if']) { + if ($int == $vlan['if']) { if ($action == "update") { - foreach ($config['interfaces'] as $ifname => $ifcfg) { - if ($ifcfg['if'] == $vlan['vlanif']) - interface_vlan_configure($vlan); - interface_configure($ifname); - } + interfaces_bring_up($int); } else if ($action == "") return $vlan; } diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 663be60..74be363 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -246,6 +246,7 @@ if ($_GET['act'] == "del") { $input_errors[] = "The interface is part of a gif tunnel. Please delete the tunnel to continue"; else { unset($config['interfaces'][$id]['enable']); + $realid = get_real_interface($id); interface_bring_down($id); /* down the interface */ unset($config['interfaces'][$id]); /* delete the specified OPTn or LAN*/ @@ -290,7 +291,7 @@ if ($_GET['act'] == "del") { unset($config['dhcpd']['wan']); } - link_interface_to_vlans($id, "update"); + link_interface_to_vlans($realid, "update"); $savemsg = "Interface has been deleted."; } |