mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
It is legitimate to be called with an empty vlanif. The webgui uses this to create new vlans.
This commit is contained in:
parent
3ae4960c78
commit
07101b63d1
@ -76,16 +76,12 @@ function interface_vlan_configure($if, $tag, $vlanif = "") {
|
||||
log_error("interface_vlan_confgure called with if defined.");
|
||||
return;
|
||||
}
|
||||
if(empty($vlanif)) {
|
||||
log_error("interface_vlan_confgure called with vlanif defined.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* make sure the parent interface is up */
|
||||
interfaces_bring_up($if);
|
||||
/* Since we are going to add vlan(4) try to enable all that hardware supports. */
|
||||
mwexec("/sbin/ifconfig {$if} vlanhwtag");
|
||||
mwexec("/sbin/ifconfig {$if} vlanmtu");
|
||||
interfaces_bring_up($if);
|
||||
/* Since we are going to add vlan(4) try to enable all that hardware supports. */
|
||||
mwexec("/sbin/ifconfig {$if} vlanhwtag");
|
||||
mwexec("/sbin/ifconfig {$if} vlanmtu");
|
||||
|
||||
if ($g['booting'] || !(empty($vlanif))) {
|
||||
mwexec("/sbin/ifconfig {$vlanif} destroy");
|
||||
@ -97,7 +93,7 @@ function interface_vlan_configure($if, $tag, $vlanif = "") {
|
||||
escapeshellarg($tag) . " vlandev " .
|
||||
escapeshellarg($if));
|
||||
|
||||
interfaces_bring_up($vlanif);
|
||||
interfaces_bring_up($vlanif);
|
||||
|
||||
/* invalidate interface cache */
|
||||
get_interface_arr(true);
|
||||
@ -113,7 +109,7 @@ function interface_vlan_configure($if, $tag, $vlanif = "") {
|
||||
}
|
||||
|
||||
/* XXX: ermal -- for now leave it here at the moment it does not hurt. */
|
||||
interfaces_bring_up($if);
|
||||
interfaces_bring_up($if);
|
||||
|
||||
return $vlanif;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user