mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: vlan: fix checking of vlan device in query-running
Ticket: CM-11804 Reviewed By: julien, nikhil Testing Done: Tested with failing config in the bug This patch makes sure macvlan devices are ignored by ifquery -ra Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
@ -188,12 +188,12 @@ class vlan(moduleBase):
|
||||
def _query_running(self, ifaceobjrunning):
|
||||
if not self.ipcmd.link_exists(ifaceobjrunning.name):
|
||||
return
|
||||
if not self.ipcmd.get_vlandev_attrs(ifaceobjrunning.name):
|
||||
(vlanrawdev, vlanid) = self.ipcmd.get_vlandev_attrs(ifaceobjrunning.name)
|
||||
if not vlanid:
|
||||
return
|
||||
# If vlan name is not in the dot format, get the
|
||||
# vlan dev and vlan id
|
||||
if not '.' in ifaceobjrunning.name:
|
||||
(vlanrawdev, vlanid) = self.ipcmd.get_vlandev_attrs(ifaceobjrunning.name)
|
||||
ifaceobjrunning.update_config_dict({(k, v) for k, v in
|
||||
{'vlan-raw-device' : vlanrawdev,
|
||||
'vlan-id' : vlanid}.items()
|
||||
|
@ -2049,7 +2049,9 @@ class ifupdownMain(ifupdownBase):
|
||||
for i in ifacenames:
|
||||
for ifaceobj in self.get_ifaceobjs(i):
|
||||
if ((not running and self.is_ifaceobj_noconfig(ifaceobj)) or
|
||||
(running and not ifaceobj.is_config_present())):
|
||||
(running and not ifaceobj.is_config_present() and
|
||||
not self.is_iface_builtin_byname(i) and
|
||||
not ifaceobj.upperifaces)):
|
||||
continue
|
||||
ifaceobjs.append(ifaceobj)
|
||||
if (ifupdownflags.flags.WITH_DEPENDS and
|
||||
|
Reference in New Issue
Block a user