mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port
Ticket: CM-14209
Reviewed By: Julien
Testing Done:
vids was a list and pvid is not a list, hence the check was failing
$ cat /etc/network/interfaces
auto vxlan1000
iface vxlan1000
vxlan-id 1000
vxlan-local-tunnelip 172.16.20.103
vxlan-remoteip 172.16.20.106
auto bridge
iface bridge
bridge-vlan-aware yes
bridge-ports swp1 vxlan1000
bridge-vids 100 200
$
$ ifdown -a -X eth0
$ ifreload -a -s
warning: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
$ ifreload -a
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings
$ ifreload -a
error: vxlan1000: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
warning: bridge: `bridge-access` attribute is mandatory when vxlan device (vxlan1000) is part of vlan aware bridge (bridge)
error: bridge: errors applying port settings
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -962,8 +962,7 @@ class bridge(moduleBase):
|
||||
|
||||
"""
|
||||
if not isbridge and bportifaceobj.link_kind & ifaceLinkKind.VXLAN:
|
||||
if ((not vids or not pvid)
|
||||
and not bportifaceobj.get_attr_value('bridge-access')):
|
||||
if not vids or not pvid or len(vids) > 1 or vids[0] != pvid:
|
||||
self._error_vxlan_in_vlan_aware_br(bportifaceobj,
|
||||
bportifaceobj.upperifaces[0])
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user