mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
ifupdownmain: fix setting of loopback flag on 'lo' interface
It was initially set in a place where only interfaces with dependencies were processed. This patch moves it to the right place. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
@@ -493,9 +493,6 @@ class ifupdownMain(ifupdownBase):
|
||||
upperifaceobj.link_type = ifaceLinkType.LINK_NA
|
||||
ifaceobj.link_type = ifaceLinkType.LINK_NA
|
||||
|
||||
if not ifaceobj.link_kind and ifaceobj.name == "lo":
|
||||
ifaceobj.link_privflags |= ifaceLinkPrivFlags.LOOPBACK
|
||||
|
||||
def dump_iface_dependency_info(self):
|
||||
""" debug funtion to print raw dependency
|
||||
info - lower and upper devices"""
|
||||
@@ -652,6 +649,10 @@ class ifupdownMain(ifupdownBase):
|
||||
|
||||
for i in self.ifaceobjdict.keys():
|
||||
iobj = self.get_ifaceobj_first(i)
|
||||
if (not iobj.link_kind and
|
||||
not (iobj.link_privflags & ifaceLinkPrivFlags.LOOPBACK) and
|
||||
iobj.name == 'lo'):
|
||||
iobj.link_privflags |= ifaceLinkPrivFlags.LOOPBACK
|
||||
if iobj.lowerifaces:
|
||||
self.dependency_graph[i] = iobj.lowerifaces
|
||||
else:
|
||||
|
Reference in New Issue
Block a user