diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2022-01-04 21:48:13 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2022-01-17 14:03:26 +0100 |
commit | 2a27f13b2197d07d11454b6cc8d0e5fc5b6ded87 (patch) | |
tree | 0e3e3f4f21943f7b960b11e474216dc3a3c36b77 /pimd/pim_msdp.c | |
parent | pimd: remove pim_str_sg_dump() (diff) | |
download | frr-2a27f13b2197d07d11454b6cc8d0e5fc5b6ded87.tar.xz frr-2a27f13b2197d07d11454b6cc8d0e5fc5b6ded87.zip |
pimd: move, rename and deploy pim_addr_is_any()
Replaces comparison against INADDR_ANY, so we can do IPv6 too.
(Renamed from "pim_is_addr_any" for "pim_addr_*" naming pattern, and
type fixed to bool.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_msdp.c')
-rw-r--r-- | pimd/pim_msdp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 1e91a931b..520d93bbf 100644 --- a/pimd/pim_msdp.c +++ b/pimd/pim_msdp.c @@ -625,8 +625,7 @@ void pim_msdp_up_join_state_changed(struct pim_instance *pim, } /* If this is not really an XG entry just move on */ - if ((xg_up->sg.src.s_addr != INADDR_ANY) - || (xg_up->sg.grp.s_addr == INADDR_ANY)) { + if (!pim_addr_is_any(xg_up->sg.src) || pim_addr_is_any(xg_up->sg.grp)) { return; } @@ -650,7 +649,7 @@ static void pim_msdp_up_xg_del(struct pim_instance *pim, pim_sgaddr *sg) } /* If this is not really an XG entry just move on */ - if ((sg->src.s_addr != INADDR_ANY) || (sg->grp.s_addr == INADDR_ANY)) { + if (!pim_addr_is_any(sg->src) || pim_addr_is_any(sg->grp)) { return; } @@ -669,7 +668,7 @@ void pim_msdp_up_del(struct pim_instance *pim, pim_sgaddr *sg) if (PIM_DEBUG_MSDP_INTERNAL) { zlog_debug("MSDP up %pSG del", sg); } - if (sg->src.s_addr == INADDR_ANY) { + if (pim_addr_is_any(sg->src)) { pim_msdp_up_xg_del(pim, sg); } else { pim_msdp_sa_local_del_on_up_del(pim, sg); |