summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2009-02-11 00:24:25 -0500
committerChris Buechler <cmb@pfsense.org>2009-02-11 00:24:25 -0500
commit554e259ed5b2f8c44510d12a9ffcac5d03c19729 (patch)
treef3d71b2304164d85338e211dde4bfc376c6e6a90 /etc/inc/interfaces.inc
parent12363a0a1168970a9cf52896e872f90a6c2fc5c3 (diff)
downloadpfsense-554e259ed5b2f8c44510d12a9ffcac5d03c19729.zip
pfsense-554e259ed5b2f8c44510d12a9ffcac5d03c19729.tar.gz
Don't enable STP on any virtual interface.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc23
1 files changed, 21 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index a70919d..6046d78 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1636,13 +1636,32 @@ function setup_bridge() {
$wirelessbridge = true;
}
+ $vfaces = array (
+ 'bridge',
+ 'ppp',
+ 'sl',
+ 'gif',
+ 'faith',
+ 'lo',
+ 'ng',
+ 'vlan',
+ 'pflog',
+ 'pfsync',
+ 'enc',
+ 'tun',
+ 'tap',
+ 'carp'
+ );
+
foreach ($bridgearray[$x] as $bridgeif) {
// iterate through all the interfaces in this bridge
// append to the bridgecmd for this interface
- // only use STP if no wireless interfaces are involved
+ // only use STP on Ethernet interfaces, not wireless
+ // nor virtual interfaces
+ $trimbridgeif = preg_replace("/[0-9]/","", $bridgeif);
if($wirelessbridge)
$bridgecmd .= " addm $bridgeif ";
- elseif (substr($bridgeif,0,4) == "vlan")
+ elseif(in_array($trimbridgeif, $vfaces))
$bridgecmd .= " addm $bridgeif ";
else
$bridgecmd .= " addm $bridgeif stp $bridgeif ";
OpenPOWER on IntegriCloud