diff --git a/addons/address.py b/addons/address.py index 8d9bb75..029c391 100644 --- a/addons/address.py +++ b/addons/address.py @@ -104,9 +104,12 @@ class address(moduleBase): newaddrs = [] addrs = ifaceobj.get_attr_value('address') if addrs: - if ifaceobj.role & ifaceRole.SLAVE: + if (ifaceobj.role & ifaceRole.SLAVE) or \ + (ifaceobj.link_kind & ifaceLinkKind.BRIDGE_VLAN_AWARE): # we must not configure an IP address if the interface is enslaved - self.log_warn('interface %s is enslaved and cannot have an IP Address' % \ + # or is a VLAN AWARE BRIDGE + self.log_warn('interface %s is enslaved or a vlan aware bridge ' + 'and cannot have an IP Address' % \ (ifaceobj.name)) return # If user address is not in CIDR notation, convert them to CIDR diff --git a/addons/bridge.py b/addons/bridge.py index 012465a..390262d 100644 --- a/addons/bridge.py +++ b/addons/bridge.py @@ -220,6 +220,9 @@ class bridge(moduleBase): if ifaceobj.link_type != ifaceLinkType.LINK_NA: ifaceobj.link_type = ifaceLinkType.LINK_MASTER ifaceobj.link_kind |= ifaceLinkKind.BRIDGE + # for special vlan aware bridges, we need to add another bit + if ifaceobj.get_attr_value_first('bridge-vlan-aware') == 'yes': + ifaceobj.link_kind |= ifaceLinkKind.BRIDGE_VLAN_AWARE ifaceobj.role |= ifaceRole.MASTER ifaceobj.dependency_type = ifaceDependencyType.MASTER_SLAVE return self.parse_port_list(ifaceobj.get_attr_value_first( diff --git a/ifupdown/iface.py b/ifupdown/iface.py index 81ded1a..e38715d 100644 --- a/ifupdown/iface.py +++ b/ifupdown/iface.py @@ -44,6 +44,7 @@ class ifaceLinkKind(): BOND = 0x2 VLAN = 0x4 VXLAN = 0x8 + BRIDGE_VLAN_AWARE = 0x10 class ifaceLinkType(): LINK_UNKNOWN = 0x0