Skip to content

Commit

Permalink
Merge pull request #16265 from FRRouting/mergify/bp/stable/10.0/pr-16252
Browse files Browse the repository at this point in the history
zebra: fix evpn mh bond member proto reinstall (backport #16252)
  • Loading branch information
ton31337 authored Jun 22, 2024
2 parents 071678c + 5d65957 commit 75757a2
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions zebra/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1696,8 +1696,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
Expand All @@ -1713,8 +1715,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);
Expand All @@ -1739,6 +1741,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",
Expand Down

0 comments on commit 75757a2

Please sign in to comment.