diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-06-21 09:46:07 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-21 09:46:07 +0300 |
| commit | bf5f0f19eb1af1bfc130f1839b74dc2af309db49 (patch) | |
| tree | 8e59649f99acbb35bf010806697229598fc22a30 /zebra/interface.c | |
| parent | c48db4327c9b2161c6760beb7c58b6f0e28e69ae (diff) | |
| parent | e4d843b438ae7cbae89ae47af0754fb1db153c6c (diff) | |
Merge pull request #16252 from chiragshah6/evpn_dev1
zebra: fix evpn mh bond member proto reinstall
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index b824977f9e..f1f24cc29f 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1656,8 +1656,10 @@ static void interface_if_protodown(struct interface *ifp, bool protodown, uint32_t rc_bitfield) { struct zebra_if *zif = ifp->info; - bool old_protodown; + bool old_protodown, reason_extern; + reason_extern = !!CHECK_FLAG(zif->protodown_rc, + ZEBRA_PROTODOWN_EXTERNAL); /* * Set our reason code to note it wasn't us. * If the reason we got from the kernel is ONLY frr though, don't @@ -1673,8 +1675,8 @@ static void interface_if_protodown(struct interface *ifp, bool protodown, return; if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_DPLANE) - zlog_debug("interface %s dplane change, protodown %s", - ifp->name, protodown ? "on" : "off"); + zlog_debug("interface %s dplane change, protodown %s curr reason_extern %u", + ifp->name, protodown ? "on" : "off", reason_extern); /* Set protodown, respectively */ COND_FLAG(zif->flags, ZIF_FLAG_PROTODOWN, protodown); @@ -1699,6 +1701,13 @@ static void interface_if_protodown(struct interface *ifp, bool protodown, return; } + if (!protodown && reason_extern) { + if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL) + zlog_debug("bond member %s has protodown reason external and clear the reason, skip reinstall.", + ifp->name); + return; + } + if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL) zlog_debug( "bond mbr %s reinstate protodown %s in the dplane", |
