mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
fix errors in interface_vlan_configure(), leading to :
OPNsense opnsense: /interfaces_vlan_edit.php: The command `/sbin/ifconfig 'em2_vlan1' vlandev 'em2' vlan '1' vlanpcp '0'' failed to execute
OPNsense opnsense: /interfaces_vlan_edit.php: The command '/usr/sbin/ngctl name 'vlan1': 'em2_vlan2'' returned exit code '71', the output was 'ngctl: send msg: No such file or directory'
interface_bring_down() doesn't use a real interface name as call argument, mwexecf('/usr/sbin/ngctl name %s: %s', array($tmpvlanif, $vlanif)) isn't used by my knowledge.
This commit is contained in:
parent
dcbbcf8987
commit
c2a45931dd
@ -224,13 +224,12 @@ function interface_vlan_configure(&$vlan)
|
||||
}
|
||||
|
||||
if (!empty($vlanif) && does_interface_exist($vlanif)) {
|
||||
interface_bring_down($vlanif, true);
|
||||
} else {
|
||||
$tmpvlanif = legacy_interface_create('vlan');
|
||||
legacy_interface_rename($tmpvlanif, $vlanif);
|
||||
mwexecf('/usr/sbin/ngctl name %s: %s', array($tmpvlanif, $vlanif));
|
||||
legacy_interface_destroy($vlanif);
|
||||
}
|
||||
|
||||
$tmpvlanif = legacy_interface_create('vlan');
|
||||
legacy_interface_rename($tmpvlanif, $vlanif);
|
||||
|
||||
$pcp = isset($vlan['pcp']) ? $vlan['pcp'] : 0;
|
||||
legacy_vlan_tag($vlanif, $if, $vlan['tag'], $pcp);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user