diff options
-rw-r--r-- | etc/inc/interfaces.inc | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 9853ffa..cf76940 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -67,14 +67,11 @@ function interface_vlan_configure($if, $tag, $vlanif = "") { global $config, $g; - /* devices with native VLAN support */ - $vlan_native_supp = $g['vlan_native_supp']; - - /* devices with long frame support */ - $vlan_long_frame = $g['vlan_long_frame']; - /* make sure the parent interface is up */ mwexec("/sbin/ifconfig " . escapeshellarg($if) . " up"); + /* 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"); @@ -86,18 +83,6 @@ function interface_vlan_configure($if, $tag, $vlanif = "") escapeshellarg($tag) . " vlandev " . escapeshellarg($if)); - /* get driver name */ - for ($j = 0; $j < strlen($if); $j++) { - if ($if[$j] >= '0' && $if[$j] <= '9') - break; - } - $drvname = substr($if, 0, $j); - - if (in_array($drvname, $vlan_native_supp)) - mwexec("/sbin/ifconfig {$if} vlanhwtag"); - else if (in_array($drvname, $vlan_long_frame)) - mwexec("/sbin/ifconfig {$if} vlanmtu"); - mwexec("/sbin/ifconfig {$vlanif} up"); /* invalidate interface cache */ |