mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
fix CARP panics with VLANs
This commit is contained in:
parent
839de3f1dc
commit
2f6f9dc381
@ -68,7 +68,18 @@ function interface_vlan_configure($if, $tag, $vlanif = "") {
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($if) . " up vlanhwtag vlanmtu");
|
||||
|
||||
if ($g['booting'] || !(empty($vlanif))) {
|
||||
mwexec("/sbin/ifconfig {$vlanif} destroy", true);
|
||||
/* before destroying, see if CARP is in use
|
||||
If an interface containing an active CARP IP is destroyed,
|
||||
the CARP interface will hang in INIT and must be destroyed
|
||||
itself before it will function again (which causes a panic).
|
||||
Trying to configure a CARP interface stuck in INIT will
|
||||
cause a panic as well. -cmb
|
||||
*/
|
||||
$carpcount = find_number_of_needed_carp_interfaces();
|
||||
/* will continue to destroy VLANs where CARP is not in use
|
||||
to retain previous behavior and avoid regressions */
|
||||
if($carpcount < 1)
|
||||
mwexec("/sbin/ifconfig {$vlanif} destroy");
|
||||
mwexec("/sbin/ifconfig {$vlanif} create");
|
||||
} else
|
||||
$vlanif = exec("/sbin/ifconfig vlan create");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user