diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index e2166c02d0..edf92dda25 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 663be60bdf..74be36370d 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."; }