예제 #1
0
 def enable_ipv6_if_prev_brport(self, ifname):
     """
     If the intf was previously enslaved to a bridge it is possible ipv6 is still disabled.
     """
     try:
         for ifaceobj in statemanager.get_ifaceobjs(ifname) or []:
             if ifaceobj.link_privflags & ifaceLinkPrivFlags.BRIDGE_PORT:
                 self.write_file("/proc/sys/net/ipv6/conf/%s/disable_ipv6" % ifname, "0")
                 return
     except Exception as e:
         self.logger.info(str(e))
예제 #2
0
 def get_saved_ifaceobj(link_exists, ifname):
     if link_exists:
         old_config = statemanager.get_ifaceobjs(ifname)
         if old_config:
             return old_config[0]
     return None
예제 #3
0
 def get_saved_ifaceobj(link_exists, ifname):
     if link_exists:
         old_config = statemanager.get_ifaceobjs(ifname)
         if old_config:
             return old_config[0]
     return None