1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

ifupdown2 should not allow IP address command under vlan aware bridge stanza

Ticket: CM-6106
Reviewed By: roopa,scotte
Testing Done: ran ifupdown2 regression suite and hand tested

This patch prevents IP address assignment under vlan aware bridges.
This prevents some confusion because a bridge subinterface is required
for layer 3 termination.
This commit is contained in:
Sam Tannous
2015-06-24 11:39:56 -04:00
parent 0532f0a3d3
commit 7f67f3e59f
3 changed files with 9 additions and 2 deletions

View File

@@ -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(