From 4e2db079564a5055a03d2e7e97807b7956c6e110 Mon Sep 17 00:00:00 2001 From: Julien Fortin Date: Thu, 12 Jan 2017 03:19:19 +0300 Subject: [PATCH] addons: bridge: warn/err if bridge-access is missing under vxlan bridge VA port Ticket: CM-14209 Reviewed By: Roopa Testing Done: $ 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: Julien Fortin --- addons/bridge.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/bridge.py b/addons/bridge.py index 97ceb4b..8908661 100644 --- a/addons/bridge.py +++ b/addons/bridge.py @@ -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 vids != pvid: self._error_vxlan_in_vlan_aware_br(bportifaceobj, bportifaceobj.upperifaces[0]) return