mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ticket #471. Bring up the removed/unassigned interface correctly if it is parent to other interfaces, as vlans.
This commit is contained in:
parent
461c0a1a4d
commit
fa4a331fa5
@ -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;
|
||||
}
|
||||
|
||||
@ -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.";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user