From bbfa1efcda80e904188413bf815f2eb428cee0c4 Mon Sep 17 00:00:00 2001 From: jack9603301 Date: Fri, 13 Nov 2020 13:13:40 +0800 Subject: bridge: T3042: Fix VLAN filter invalid work 1. Due to the previous focus on the implementation of VLAN filter, it was not considered to include MTU settings, which will lead to MTU setting errors in some cases 2. In order to make VLAN aware of the work of the bridge, it is necessary to specify the allowed VLAN ID range for the bridge itself, and forget to join it before --- python/vyos/ifconfig/bridge.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'python/vyos') diff --git a/python/vyos/ifconfig/bridge.py b/python/vyos/ifconfig/bridge.py index 772db3543..7eac9b886 100644 --- a/python/vyos/ifconfig/bridge.py +++ b/python/vyos/ifconfig/bridge.py @@ -317,6 +317,13 @@ class BridgeIf(Interface): cmd = f'bridge vlan add dev {interface} vid {vlan} master' self._cmd(cmd) + + vif = dict_search('vif', config) + if vif: + for vlan_id,vif_config in vif.items(): + cmd = f'bridge vlan add dev {ifname} vid {vlan_id} self master' + self._cmd(cmd) + # enable/disable Vlan Filter self.set_vlan_filter(vlan_filter) -- cgit v1.2.3