diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2021-06-25 10:53:26 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2021-11-17 11:17:44 +0100 |
commit | 4efdb9c6282485e48ffd387e10b0a0e116de0bb9 (patch) | |
tree | c3c3e250a1f9c4365913a5e7e545b6ae8da463cb /pimd/pim_cmd.c | |
parent | pimd: actually return msec in timer_remain_msec() (diff) | |
download | frr-4efdb9c6282485e48ffd387e10b0a0e116de0bb9.tar.xz frr-4efdb9c6282485e48ffd387e10b0a0e116de0bb9.zip |
pimd: clean up BSR NHT & fix parallel links
The Bootstrap message RX path needs a RPF check for the BSR address,
and this is implemented both incorrectly as well as quite ugly.
Clean up and fix case when we have multiple interfaces to the same LAN
and/or ECMP nexthops (both would cause message duplication, the former
can even cause BSM forwarding loops.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_cmd.c')
-rw-r--r-- | pimd/pim_cmd.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index e5ee7a82a..518fcb00e 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -4061,17 +4061,9 @@ static void clear_pim_bsr_db(struct pim_instance *pim) struct rp_info *rp_all; struct pim_upstream *up; struct rp_info *rp_info; - bool is_bsr_tracking = true; - /* Remove next hop tracking for the bsr */ - nht_p.family = AF_INET; - nht_p.prefixlen = IPV4_MAX_BITLEN; - nht_p.u.prefix4 = pim->global_scope.current_bsr; - if (PIM_DEBUG_BSM) { - zlog_debug("%s: Deregister BSR addr %pFX with Zebra NHT", - __func__, &nht_p); - } - pim_delete_tracked_nexthop(pim, &nht_p, NULL, NULL, is_bsr_tracking); + if (pim->global_scope.current_bsr.s_addr) + pim_nht_bsr_del(pim, pim->global_scope.current_bsr); /* Reset scope zone data */ pim->global_scope.accept_nofwd_bsm = false; @@ -4119,7 +4111,7 @@ static void clear_pim_bsr_db(struct pim_instance *pim) __func__, &nht_p); } - pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info, false); + pim_delete_tracked_nexthop(pim, &nht_p, NULL, rp_info); if (!str2prefix("224.0.0.0/4", &g_all)) return; |