diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-10-02 14:49:09 -0400 |
|---|---|---|
| committer | Chirag Shah <chirag@nvidia.com> | 2022-03-02 18:34:32 -0800 |
| commit | 8b48cdb913d7c04ee215cc64f337feb6a68954e2 (patch) | |
| tree | 96ef3beec9296e20454d8154ba1d3eeb525b4e88 /zebra/interface.c | |
| parent | d78fa57195ea66b5b2ecd8f0c792e6aea857489d (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/interface.c')
| -rw-r--r-- | zebra/interface.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index fbd2aac005..12c073144c 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -517,7 +517,7 @@ void if_flags_update(struct interface *ifp, uint64_t newflags) /* inoperative -> operative? */ ifp->flags = newflags; if (if_is_operative(ifp)) - if_up(ifp); + if_up(ifp, true); } } @@ -1045,7 +1045,7 @@ bool if_nhg_dependents_is_empty(const struct interface *ifp) } /* Interface is up. */ -void if_up(struct interface *ifp) +void if_up(struct interface *ifp, bool install_connected) { struct zebra_if *zif; struct interface *link_if; @@ -1077,7 +1077,8 @@ void if_up(struct interface *ifp) #endif /* Install connected routes to the kernel. */ - if_install_connected(ifp); + if (install_connected) + if_install_connected(ifp); /* Handle interface up for specific types for EVPN. Non-VxLAN interfaces * are checked to see if (remote) neighbor entries need to be installed @@ -2778,7 +2779,7 @@ int if_linkdetect(struct interface *ifp, bool detect) /* Interface may come up after disabling link detection */ if (if_is_operative(ifp) && !if_was_operative) - if_up(ifp); + if_up(ifp, true); } /* FIXME: Will defer status change forwarding if interface does not come down! */ |
