diff options
author | Chris Buechler <cmb@pfsense.org> | 2007-12-25 09:15:22 +0000 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2007-12-25 09:15:22 +0000 |
commit | 434d8e7dd516a008fbc8ea96367162147682a825 (patch) | |
tree | 361e27599475df4d5d926ef3f5e18e479462acdc /etc | |
parent | 6556f5476d363c44388941f6f7782ff4aa671201 (diff) | |
download | pfsense-434d8e7dd516a008fbc8ea96367162147682a825.zip pfsense-434d8e7dd516a008fbc8ea96367162147682a825.tar.gz |
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.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/globals.inc | 4 | ||||
-rw-r--r-- | etc/inc/interfaces.inc | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc index 1b86807..ec0dc2c 100644 --- a/etc/inc/globals.inc +++ b/etc/inc/globals.inc @@ -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"); -?> +?>
\ No newline at end of file diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 531dc26..1b4e1e4 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -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; } -?> +?>
\ No newline at end of file |