1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

if 'bridge-vlan-aware yes' specified, explicitly set 1 in bridge sysfs

vlan_filtering flags.

Ticket: CM-3346
Reviewed By:
Testing Done: Tested new bridge driver sanity
This commit is contained in:
Roopa Prabhu
2014-11-21 10:17:37 -08:00
parent d6e2eb5705
commit 11f3290e60

View File

@@ -500,6 +500,10 @@ class bridge(moduleBase):
'/sys/class/net/%s/bridge/stp_state' %ifaceobj.name) '/sys/class/net/%s/bridge/stp_state' %ifaceobj.name)
if running_stp_state and running_stp_state != '0': if running_stp_state and running_stp_state != '0':
self.brctlcmd.set_stp(ifaceobj.name, 'no') self.brctlcmd.set_stp(ifaceobj.name, 'no')
if ifaceobj.get_attr_value_first('bridge-vlan-aware') == 'yes':
self.write_file('/sys/class/net/%s/bridge/vlan_filtering'
%ifaceobj.name, '1')
# Use the brctlcmd bulk set method: first build a dictionary # Use the brctlcmd bulk set method: first build a dictionary
# and then call set # and then call set
bridgeattrs = { k:v for k,v in bridgeattrs = { k:v for k,v in