Skip to content

Commit bf5f0f1

Browse files
authored
Merge pull request FRRouting#16252 from chiragshah6/evpn_dev1
zebra: fix evpn mh bond member proto reinstall
2 parents c48db43 + e4d843b commit bf5f0f1

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

zebra/interface.c

+12-3
Original file line numberDiff line numberDiff line change
@@ -1656,8 +1656,10 @@ static void interface_if_protodown(struct interface *ifp, bool protodown,
16561656
uint32_t rc_bitfield)
16571657
{
16581658
struct zebra_if *zif = ifp->info;
1659-
bool old_protodown;
1659+
bool old_protodown, reason_extern;
16601660

1661+
reason_extern = !!CHECK_FLAG(zif->protodown_rc,
1662+
ZEBRA_PROTODOWN_EXTERNAL);
16611663
/*
16621664
* Set our reason code to note it wasn't us.
16631665
* 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,
16731675
return;
16741676

16751677
if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_DPLANE)
1676-
zlog_debug("interface %s dplane change, protodown %s",
1677-
ifp->name, protodown ? "on" : "off");
1678+
zlog_debug("interface %s dplane change, protodown %s curr reason_extern %u",
1679+
ifp->name, protodown ? "on" : "off", reason_extern);
16781680

16791681
/* Set protodown, respectively */
16801682
COND_FLAG(zif->flags, ZIF_FLAG_PROTODOWN, protodown);
@@ -1699,6 +1701,13 @@ static void interface_if_protodown(struct interface *ifp, bool protodown,
16991701
return;
17001702
}
17011703

1704+
if (!protodown && reason_extern) {
1705+
if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL)
1706+
zlog_debug("bond member %s has protodown reason external and clear the reason, skip reinstall.",
1707+
ifp->name);
1708+
return;
1709+
}
1710+
17021711
if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL)
17031712
zlog_debug(
17041713
"bond mbr %s reinstate protodown %s in the dplane",

0 commit comments

Comments
 (0)