]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Handle receive of (*,G) register stop with src addr as 0
authorMobashshera Rasool <mrasool@vmware.com>
Tue, 7 Jun 2022 12:41:37 +0000 (05:41 -0700)
committerMobashshera Rasool <mrasool@vmware.com>
Tue, 7 Jun 2022 12:53:46 +0000 (05:53 -0700)
PIM conformance test case 11.12 sends a register stop msg with
source address as 0. This should trigger a register stop for
all the upstreams. It is not happening as such because we are not
considering 0.0.0.0 source address for starg_handling.

Fixed it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
pimd/pim_register.c

index 6b76f4c49b55c9364cf06af9ffea0973f454edb3..1945d99d210e7d0438c4912c9c18380dd8785b74 100644 (file)
@@ -175,7 +175,12 @@ int pim_register_stop_recv(struct interface *ifp, uint8_t *buf, int buf_size)
        rp = RP(pim_ifp->pim, sg.grp);
        if (rp) {
                rpf_addr = pim_addr_from_prefix(&rp->rpf_addr);
-               if (pim_addr_cmp(sg.src, rpf_addr) == 0) {
+               /* As per RFC 7761, Section 4.9.4:
+                * A special wildcard value consisting of an address field of
+                * all zeros can be used to indicate any source.
+                */
+               if ((pim_addr_cmp(sg.src, rpf_addr) == 0) ||
+                   pim_addr_is_any(sg.src)) {
                        handling_star = true;
                        sg.src = PIMADDR_ANY;
                }