diff options
Diffstat (limited to 'python/vyos/configdict.py')
-rw-r--r-- | python/vyos/configdict.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index e9ef39930..29d89520c 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -222,8 +222,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 : {}}) return ret_val |