From: Donald Sharp Date: Thu, 30 Mar 2017 03:27:25 +0000 (-0400) Subject: pimd: Fix RP determination to handle secondary addresses better X-Git-Tag: reindent-master-before~222^2~9 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7399328a6fbd9e41e03cc8d0c9bfbf16a5738c9a;p=mirror%2Ffrr.git pimd: Fix RP determination to handle secondary addresses better When we are checking RP addresses and looking at the secondary address. With the addition of the ability to handle v6 addresses in the secondary list. Assuming that the secondary address is a v4 address is a no go. Convert to prefix_same. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 6c83811d9a..8afc87956d 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -261,7 +261,7 @@ pim_rp_check_interface_addrs(struct rp_info *rp_info, } for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, node, sec_addr)) { - if (sec_addr->addr.s_addr == rp_info->rp.rpf_addr.u.prefix4.s_addr) { + if (prefix_same(&sec_addr->addr, &rp_info->rp.rpf_addr)) { return 1; } }