Use list of VLAN long frame and native capable interfaces from globals.inc, and remove duplicate (and incomplete) list in interfaces.inc. Update list in globals.inc.

This commit is contained in:
Chris Buechler 2007-12-25 09:15:22 +00:00
parent 6556f5476d
commit 434d8e7dd5
2 changed files with 8 additions and 7 deletions

View File

@ -64,7 +64,7 @@ $g = array(
"embeddedbootupslice" => "/dev/ad0a",
"wireless_regex" => "/^(ndis|wi|ath|an|ral|ural|wai|iwi|awi|wlan)/",
"vlan_native_supp" => array("bfe", "dc", "fxp", "gem", "hme", "rl", "sis", "ste", "tl", "tx", "xl"),
"vlan_long_frame" => array("bfe", "bge", "dc", "em", "fxp", "gem", "hme", "ixgb", "nge", "re", "rl", "sis", "ste", "ti", "tl", "tx", "txp", "xl", "sk")
"vlan_long_frame" => array("bfe", "bge", "dc", "em", "fxp", "gem", "hme", "ixgb", "le", "nge", "re", "rl", "sis", "sk", "ste", "ti", "tl", "tx", "txp", "xl")
);
/* IP TOS flags */
@ -73,4 +73,4 @@ $iptos = array("lowdelay", "throughput", "reliability");
/* TCP flags */
$tcpflags = array("syn", "ack", "fin", "rst", "psh", "urg");
?>
?>

View File

@ -37,6 +37,7 @@
/* include all configuration functions */
require_once("functions.inc");
require_once("globals.inc");
function interfaces_loopback_configure() {
mwexec("/sbin/ifconfig lo0 127.0.0.1");
@ -45,15 +46,15 @@ function interfaces_loopback_configure() {
}
function interfaces_vlan_configure() {
global $config;
global $config, $g;
if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) {
/* devices with native VLAN support */
$vlan_native_supp = explode(" ", "bge em ixgb nge re ti txp vge");
$vlan_native_supp = $g['vlan_native_supp'];
/* devices with long frame support */
$vlan_long_supp = explode(" ", "bfe dc fxp gem hme le rl sis sk ste tl tx xl");
$vlan_long_frame = $g['vlan_long_frame'];
/* sweep through and axe old interfaces */
$vlan_count = get_number_of_vlan_interfaces();
@ -77,7 +78,7 @@ function interfaces_vlan_configure() {
if (in_array($drvname, $vlan_native_supp))
$cmd .= " link0";
else if (in_array($drvname, $vlan_long_supp))
else if (in_array($drvname, $vlan_long_frame))
$cmd .= " mtu 1500";
mwexec($cmd);
@ -1680,4 +1681,4 @@ function get_interface_mac($interface) {
return $mac;
}
?>
?>