]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Allow multiple secondary addresses to work
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 10 Aug 2020 14:32:17 +0000 (10:32 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 10 Aug 2020 14:32:17 +0000 (10:32 -0400)
Suppose you have more than 2 addresses on a pim interface:
lo              up      default         10.255.0.1/32
                                        10.255.0.101/32
                                        10.255.0.254/32

A `show ip pim int lo` gives us this:

eva# show ip pim interface lo
Interface  : lo
State      : up
Address    : 10.255.0.1 (primary)
             10.255.0.101/32

When we go look at the code that pulls secondary addresses in
we are using a prefix_cmp to know if we know about a secondary already
but were expecting true values instead of -1/0/1 being returned.

Modify code so that pim sees all secondary addresses

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_iface.c

index b79fb689dc211b698e27a986edc9fcd9f651a791..88bcc48f8080ede2b30d04f1b905b07137c91409 100644 (file)
@@ -341,7 +341,7 @@ pim_sec_addr_find(struct pim_interface *pim_ifp, struct prefix *addr)
        struct listnode *node;
 
        for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, node, sec_addr)) {
-               if (prefix_cmp(&sec_addr->addr, addr)) {
+               if (prefix_cmp(&sec_addr->addr, addr) == 0) {
                        return sec_addr;
                }
        }