summaryrefslogtreecommitdiffstats
path: root/pimd/pim_bsm.c
diff options
context:
space:
mode:
authorsarita patra <saritap@vmware.com>2022-02-25 14:17:08 +0100
committersarita patra <saritap@vmware.com>2022-03-01 18:45:56 +0100
commitcc144e8b6b11e7e44f34871dd24b1ab21107b4b8 (patch)
treecc3c985c57a6ff7393d38c422e5ebc6e556f1ac6 /pimd/pim_bsm.c
parentMerge pull request #10615 from mobash-rasool/fixes (diff)
downloadfrr-cc144e8b6b11e7e44f34871dd24b1ab21107b4b8.tar.xz
frr-cc144e8b6b11e7e44f34871dd24b1ab21107b4b8.zip
pimd: replace inaddr_none with PIMADDR_ANY
We can use PIMADDR_ANY instead of INADDR_NONE to initalize rp->rpf_addr when there is no rp configured for group_all. Signed-off-by: sarita patra <saritap@vmware.com>
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 0b993ec05..1ac604686 100644
--- a/pimd/pim_bsm.c
+++ b/pimd/pim_bsm.c
@@ -433,8 +433,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)
@@ -637,8 +637,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 */
@@ -671,7 +670,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);