summaryrefslogtreecommitdiff
path: root/pimd/pim_bsm.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2022-03-02 10:42:17 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2022-03-02 10:42:17 +0100
commit6564f5e5a56bb4edf0827878d76e381f1ecf910f (patch)
treef8b0f51339c8251c960565a9cac7e16134e959da /pimd/pim_bsm.c
parentf2ec36de775017e84ba44acdcaffff914f076f1a (diff)
parentb369d0cc4077055f4649708ff3bd6dba7c1892b4 (diff)
Merge pull request #10657 from patrasar/pim_remove_in_addr_none
[manual merge to edit comment, didn't want to incur another cycle] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_bsm.c')
-rw-r--r--pimd/pim_bsm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c
index 4d1e700ab0..c45823cb87 100644
--- a/pimd/pim_bsm.c
+++ b/pimd/pim_bsm.c
@@ -430,8 +430,8 @@ static void pim_instate_pend_list(struct bsgrp_node *bsgrp_node)
* install the rp from head(if exists) of partial list. List is
* is sorted such that head is the elected RP for the group.
*/
- if (!rn || (prefix_same(&rp_all->group, &bsgrp_node->group)
- && pim_rpf_addr_is_inaddr_none(&rp_all->rp))) {
+ if (!rn || (prefix_same(&rp_all->group, &bsgrp_node->group) &&
+ pim_rpf_addr_is_inaddr_any(&rp_all->rp))) {
if (PIM_DEBUG_BSM)
zlog_debug("%s: Route node doesn't exist", __func__);
if (pend)
@@ -634,8 +634,7 @@ void pim_bsm_clear(struct pim_instance *pim)
rp_all = pim_rp_find_match_group(pim, &g_all);
if (rp_all == rp_info) {
- rp_all->rp.rpf_addr.family = AF_INET;
- rp_all->rp.rpf_addr.u.prefix4.s_addr = INADDR_NONE;
+ pim_addr_to_prefix(&rp_all->rp.rpf_addr, PIMADDR_ANY);
rp_all->i_am_rp = 0;
} else {
/* Delete the rp_info from rp-list */
@@ -668,7 +667,7 @@ void pim_bsm_clear(struct pim_instance *pim)
trp_info = pim_rp_find_match_group(pim, &grp);
/* RP not found for the group grp */
- if (pim_rpf_addr_is_inaddr_none(&trp_info->rp)) {
+ if (pim_rpf_addr_is_inaddr_any(&trp_info->rp)) {
pim_upstream_rpf_clear(pim, up);
pim_rp_set_upstream_addr(pim, &up->upstream_addr,
up->sg.src, up->sg.grp);