diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2022-01-14 16:55:12 +0100 | 
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2022-02-14 06:45:03 +0100 | 
| commit | c631920c151f0130986cb9051daa710bb0eb261b (patch) | |
| tree | bc3351777ea0323aa17ebd2878516a31a29e75ad /pimd/pim_join.c | |
| parent | 80d9fa1e68a48786c8208dea3ef1171a7d3ccc38 (diff) | |
pim6d: IPv6-adjust various pim_sgaddr uses
Since `pim_sgaddr` is `pim_addr` now, that causes a whole lot of fallout
anywhere S,G pairs are handled.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_join.c')
| -rw-r--r-- | pimd/pim_join.c | 11 | 
1 files changed, 5 insertions, 6 deletions
diff --git a/pimd/pim_join.c b/pimd/pim_join.c index a3a97f20e5..7aea411606 100644 --- a/pimd/pim_join.c +++ b/pimd/pim_join.c @@ -84,6 +84,7 @@ static void recv_join(struct interface *ifp, struct pim_neighbor *neigh,  	if ((source_flags & PIM_RPT_BIT_MASK)  	    && (source_flags & PIM_WILDCARD_BIT_MASK)) {  		struct pim_rpf *rp = RP(pim_ifp->pim, sg->grp); +		pim_addr rpf_addr;  		if (!rp) {  			zlog_warn("%s: Lookup of RP failed for %pSG", __func__, @@ -94,13 +95,11 @@ static void recv_join(struct interface *ifp, struct pim_neighbor *neigh,  		 * If the RP sent in the message is not  		 * our RP for the group, drop the message  		 */ -		if (sg->src.s_addr != rp->rpf_addr.u.prefix4.s_addr) { -			char local_rp[INET_ADDRSTRLEN]; -			pim_inet4_dump("<local?>", rp->rpf_addr.u.prefix4, -				       local_rp, sizeof(local_rp)); +		rpf_addr = pim_addr_from_prefix(&rp->rpf_addr); +		if (pim_addr_cmp(sg->src, rpf_addr)) {  			zlog_warn( -				"%s: Specified RP(%pPAs) in join is different than our configured RP(%s)", -				__func__, &sg->src, local_rp); +				"%s: Specified RP(%pPAs) in join is different than our configured RP(%pPAs)", +				__func__, &sg->src, &rpf_addr);  			return;  		}  | 
