summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2022-02-15 12:36:18 -0500
committerStephen Worley <sworley@nvidia.com>2022-03-09 18:02:44 -0500
commit4b82b9548879ad3b888fd7d8b9cea99a55260c55 (patch)
tree106fb64777297286cac6f71ce3c5f14460f10a6a
parentcb5b31f5d011d3dcb2df5d876447fb3c7f758e6a (diff)
zebra: evpn-mh bonds protodown check for set
When we are processing a bond member's protodown we get from the dataplane, check to make sure we haven't already queued up a set. If we have, it's likely this is just a notification we get from the kernel after we set protodown and before we have processed the result in our dplane pthread. This change is needed now that we set protodown via the dplane pthread. Signed-off-by: Stephen Worley <sworley@nvidia.com>
-rw-r--r--zebra/if_netlink.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 3591106fed..47e0140256 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -872,6 +872,13 @@ static void netlink_proc_dplane_if_protodown(struct zebra_if *zif,
zif->flags &= ~ZIF_FLAG_PROTODOWN;
if (zebra_evpn_is_es_bond_member(zif->ifp)) {
+ /* Check it's not already being sent to the dplane first */
+ if (protodown && (zif->flags & ZIF_FLAG_SET_PROTODOWN))
+ return;
+
+ if (!protodown && (zif->flags & ZIF_FLAG_UNSET_PROTODOWN))
+ return;
+
if (IS_ZEBRA_DEBUG_EVPN_MH_ES || IS_ZEBRA_DEBUG_KERNEL)
zlog_debug(
"bond mbr %s re-instate protdown %s in the dplane",