mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
ifupdownmain: redo shared dependent checks
Ticket: CM-10027 Reviewed By: julien, nikhil Testing Done: Tested with an interfaces file with shared dependents In the process of fixing this saw a few more issues with link kind handing. Its better to separate kind from interface private flags like bond slave and bridge port. this patch cleans up all that handling. Example errors: error: misconfig..? swp5.2 vrfslave is enslaved to multiple interfaces ['vrf1012', 'br2'] error: misconfig..? swp5.2 bridgeport is enslaved to multiple interfaces ['vrf1012', 'br2']
This commit is contained in:
@@ -128,8 +128,10 @@ class address(moduleBase):
|
||||
if not addrs:
|
||||
continue
|
||||
|
||||
if ((ifaceobj.role & ifaceRole.SLAVE) or
|
||||
(ifaceobj.link_kind & ifaceLinkKind.BRIDGE_VLAN_AWARE)):
|
||||
if (((ifaceobj.role & ifaceRole.SLAVE) and
|
||||
not (ifaceobj.link_privflags & ifaceLinkPrivFlags.VRF_SLAVE)) or
|
||||
((ifaceobj.link_kind & ifaceLinkKind.BRIDGE) and
|
||||
(ifaceobj.link_privflags & ifaceLinkPrivFlags.BRIDGE_VLAN_AWARE))):
|
||||
# we must not configure an IP address if the interface is
|
||||
# enslaved or is a VLAN AWARE BRIDGE
|
||||
self.logger.info('%s: ignoring ip address. Interface is '
|
||||
|
Reference in New Issue
Block a user