From 5c843270541c8d911ee59f90a556ec86c25e46d9 Mon Sep 17 00:00:00 2001 From: Anuradha Karuppiah Date: Thu, 4 Jun 2020 05:57:33 -0700 Subject: [PATCH] zebra: re-sync protodown state when a port/mbr is linked to an ES-bond The code for this was already there but was not kicking in because of a zebra local reason-code dup check. Even if the reason-code is the same, if the dplane and zebra disagree about the protodown state zebra will need to re-program the dplane. Fixed a couple of spelling errors in the protodown logs to make greps easy. Signed-off-by: Anuradha Karuppiah --- zebra/zebra_evpn_mh.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index 53412a434e..b1b01ba75e 100644 --- a/zebra/zebra_evpn_mh.c +++ b/zebra/zebra_evpn_mh.c @@ -3174,16 +3174,14 @@ void zebra_evpn_mh_update_protodown_bond_mbr(struct zebra_if *zif, bool clear, protodown_rc = bond_zif->protodown_rc; } - if (zif->protodown_rc == protodown_rc) - return; - old_protodown = !!(zif->flags & ZIF_FLAG_PROTODOWN); old_protodown_rc = zif->protodown_rc; zif->protodown_rc &= ~ZEBRA_PROTODOWN_EVPN_ALL; zif->protodown_rc |= (protodown_rc & ZEBRA_PROTODOWN_EVPN_ALL); new_protodown = !!zif->protodown_rc; - if (IS_ZEBRA_DEBUG_EVPN_MH_ES) + if (IS_ZEBRA_DEBUG_EVPN_MH_ES + && (zif->protodown_rc != old_protodown_rc)) zlog_debug( "%s bond mbr %s protodown_rc changed; old 0x%x new 0x%x", caller, zif->ifp->name, old_protodown_rc,