]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Fix RP determination to handle secondary addresses better
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 30 Mar 2017 03:27:25 +0000 (23:27 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 30 Mar 2017 13:34:03 +0000 (09:34 -0400)
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 <sharpd@cumulusnetworks.com>
pimd/pim_rp.c

index 6c83811d9af1dc419251cf54d627d1553de99246..8afc87956d90ba9cfa412f5874ba50cccd5b1c6e 100644 (file)
@@ -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;
     }
   }