summaryrefslogtreecommitdiff
path: root/zebra/if_netlink.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-10-02 14:49:09 -0400
committerChirag Shah <chirag@nvidia.com>2022-03-02 18:34:32 -0800
commit8b48cdb913d7c04ee215cc64f337feb6a68954e2 (patch)
tree96ef3beec9296e20454d8154ba1d3eeb525b4e88 /zebra/if_netlink.c
parentd78fa57195ea66b5b2ecd8f0c792e6aea857489d (diff)
zebra: Prevent installation of connected multiple times
With recent changes to interface up mechanics in if_netlink.c FRR was receiving as many as 4 up events for an interface on ifdown/ifup events. This was causing timing issues in FRR based upon some fun timings. Remove this from happening. Ticket: CM-31623 Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/if_netlink.c')
-rw-r--r--zebra/if_netlink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 42e55acb51..a75b165270 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -1920,6 +1920,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
}
if (if_is_no_ptm_operative(ifp)) {
+ bool is_up = if_is_operative(ifp);
ifp->flags = ifi->ifi_flags & 0x0000fffff;
if (!if_is_no_ptm_operative(ifp) ||
CHECK_FLAG(zif->flags,
@@ -1939,7 +1940,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
zlog_debug(
"Intf %s(%u) PTM up, notifying clients",
name, ifp->ifindex);
- if_up(ifp);
+ if_up(ifp, !is_up);
/* Update EVPN VNI when SVI MAC change
*/
@@ -1975,7 +1976,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
zlog_debug(
"Intf %s(%u) has come UP",
name, ifp->ifindex);
- if_up(ifp);
+ if_up(ifp, true);
if (IS_ZEBRA_IF_BRIDGE(ifp))
chgflags =
ZEBRA_BRIDGE_MASTER_UP;