summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/interface.py
diff options
context:
space:
mode:
authorjack9603301 <jack9603301@163.com>2020-12-12 00:36:57 +0800
committerjack9603301 <jack9603301@163.com>2020-12-13 02:12:46 +0800
commit7f2b4a8ba9b963399c0b94c6504d29168b79a1ab (patch)
tree188bfa8e8b3d0ab36e0d97eb3bb1c0d117152c4a /python/vyos/ifconfig/interface.py
parent780573690fad3f5ff8e40e33ecf47f1264d9eb9d (diff)
downloadvyos-1x-7f2b4a8ba9b963399c0b94c6504d29168b79a1ab.tar.gz
vyos-1x-7f2b4a8ba9b963399c0b94c6504d29168b79a1ab.zip
interfaces: T3114: Improve the processing of enabling logic for `vlan_filter` to avoid redundant paths
Diffstat (limited to 'python/vyos/ifconfig/interface.py')
-rw-r--r--python/vyos/ifconfig/interface.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py
index e11c04209..699896cb2 100644
--- a/python/vyos/ifconfig/interface.py
+++ b/python/vyos/ifconfig/interface.py
@@ -918,13 +918,9 @@ class Interface(Control):
if 'allowed_vlan' in bridge_config:
vlan_filter = 1
-
- if vlan_filter:
if 'native_vlan' not in bridge_config:
cmd = f'bridge vlan del dev {self.ifname} vid 1'
self._cmd(cmd)
-
- if 'allowed_vlan' in bridge_config:
for vlan in bridge_config['allowed_vlan']:
cmd = f'bridge vlan add dev {self.ifname} vid {vlan} master'
self._cmd(cmd)