summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/configdict.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index cc50c5167..37cf2e114 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -228,8 +228,18 @@ def is_member(conf, interface, intftype=None):
for intf in conf.list_nodes(base):
member = base + [intf, 'member', 'interface', interface]
if conf.exists(member):
- if conf.exists(['interfaces', Section.section(interface), interface]):
- ret_val.update({intf : {}})
+ member_type = Section.section(interface)
+ # Check if it's a VLAN (QinQ) interface
+ interface = interface.split('.')
+ if len(interface) == 3:
+ if conf.exists(['interfaces', member_type, interface[0], 'vif-s', interface[1], 'vif-c', interface[2]]):
+ ret_val.update({intf : {}})
+ elif len(interface) == 2:
+ if conf.exists(['interfaces', member_type, interface[0], 'vif', interface[1]]):
+ ret_val.update({intf : {}})
+ else:
+ if conf.exists(['interfaces', member_type, interface[0]]):
+ ret_val.update({intf : {}})
old_level = conf.set_level(old_level)
return ret_val