From 554e259ed5b2f8c44510d12a9ffcac5d03c19729 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Wed, 11 Feb 2009 00:24:25 -0500 Subject: Don't enable STP on any virtual interface. --- etc/inc/interfaces.inc | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'etc') 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 "; -- cgit v1.1