From d4403f1e77800d9d19c6a8bb241f207fc2443844 Mon Sep 17 00:00:00 2001 From: Julien Fortin Date: Tue, 1 Jun 2021 12:21:55 +0200 Subject: [PATCH] addons: vxlan: ifquery-check: don't check fdb running state if mcastgrp-map or remoteip map are not configured fdb entries can be added by FRR, so we won't be checking the running state if there's no record of a user configuration in /e/n/i Signed-off-by: Julien Fortin --- ifupdown2/addons/vxlan.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ifupdown2/addons/vxlan.py b/ifupdown2/addons/vxlan.py index ef887bf..2ad8f94 100644 --- a/ifupdown2/addons/vxlan.py +++ b/ifupdown2/addons/vxlan.py @@ -1468,7 +1468,14 @@ class vxlan(Vxlan, moduleBase): # # vxlan-mcastgrp-map & vxlan-remoteip-map - # + # fdb entries can be added by FRR, so we won't be checking the running + # state if there's no record of a user configuration in /e/n/i + user_mcastgrp_map = self.__get_vxlan_mcastgrp_map(ifaceobj) + user_remote_ip_map = self.__get_vxlan_remote_ip_map(ifaceobj) + + if not user_mcastgrp_map or not user_remote_ip_map: + return + fdb_mcast = {} fdb_remote = {} @@ -1485,8 +1492,6 @@ class vxlan(Vxlan, moduleBase): # # vxlan-mcastgrp-map # - user_mcastgrp_map = self.__get_vxlan_mcastgrp_map(ifaceobj) - if not user_mcastgrp_map and fdb_mcast: ifaceobjcurr.update_config_with_status( "vxlan-mcastgrp-map", @@ -1505,8 +1510,6 @@ class vxlan(Vxlan, moduleBase): # # vxlan-remoteip-map # - user_remote_ip_map = self.__get_vxlan_remote_ip_map(ifaceobj) - if not user_remote_ip_map and fdb_remote: ifaceobjcurr.update_config_with_status( "vxlan-remoteip-map",