diff options
| author | Sai Gomathi N <nsaigomathi@vmware.com> | 2023-03-17 03:51:16 -0700 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-05-02 15:56:34 +0000 |
| commit | eaf0abf7b65d813a19f879714ed8b0d33debc672 (patch) | |
| tree | 7b3e93956bfba6c4186bb08c617e55c545331ebf /pimd/pim_neighbor.c | |
| parent | e7dddd66b4c0707a15ff55f03c933afd97f80115 (diff) | |
pimd: PIM not sending register packets after changing from non DR to DR
When the router is non dr for an interface, it installs mroute to drop
the packets from directly connected source. This was done to avoid packets
coming to cpu as nocache hit. Later when it gets change from non-DR to DR,
these entries are not cleared. So the packets are still dropped.
This causes register packets not getting generated.
So cleaning up the mroute entries and channel oil without
upstream reference which was created to drop.
Co-authored-by: Saravanan K <saravanank@vmware.com>
Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
(cherry picked from commit 1c883aef96013753f5467ba5e5028dee0f0a82c5)
Diffstat (limited to 'pimd/pim_neighbor.c')
| -rw-r--r-- | pimd/pim_neighbor.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index 7726ac00b0..b941eae126 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -42,6 +42,7 @@ #include "pim_jp_agg.h" #include "pim_bfd.h" #include "pim_register.h" +#include "pim_oil.h" static void dr_election_by_addr(struct interface *ifp) { @@ -136,9 +137,10 @@ int pim_if_dr_election(struct interface *ifp) pim_if_update_could_assert(ifp); pim_if_update_assert_tracking_desired(ifp); - if (PIM_I_am_DR(pim_ifp)) + if (PIM_I_am_DR(pim_ifp)) { pim_ifp->am_i_dr = true; - else { + pim_clear_nocache_state(pim_ifp); + } else { if (pim_ifp->am_i_dr == true) { pim_reg_del_on_couldreg_fail(ifp); pim_ifp->am_i_dr = false; |
