From 31bddf7647f3e9c916d1fd9831d85cc9d82acb11 Mon Sep 17 00:00:00 2001 From: Julien Fortin Date: Mon, 31 May 2021 15:27:20 +0200 Subject: [PATCH] addons: bridge: bridge-vlan-vni-map: fix display error vnis=vlans instead of vlans=vnis Signed-off-by: Julien Fortin --- ifupdown2/addons/bridge.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py index 20a35b7..7526071 100644 --- a/ifupdown2/addons/bridge.py +++ b/ifupdown2/addons/bridge.py @@ -3888,7 +3888,11 @@ class bridge(Bridge, moduleBase): # bridge-vlan-vni-map # try: - cached_vlans, cached_vnis = self.get_vlan_vni_ranges( + # there's a mix-up vlan_vni should return vlans/vnis and not vnis/vlans + # ifquery-check is also using this function and has already code to work + # around the issue, so to fix our ordering problem we will simply and + # temporarily, swap the two return values + cached_vnis, cached_vlans = self.get_vlan_vni_ranges( self.cache.get_vlan_vni(ifaceobjrunning.name), compress=True )