From e502ecad11ec444a83bf7ad87e0c446d986bb8c7 Mon Sep 17 00:00:00 2001 From: Mobashshera Rasool Date: Tue, 7 Jun 2022 05:41:37 -0700 Subject: [PATCH] pimd: Handle receive of (*,G) register stop with src addr as 0 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 --- pimd/pim_register.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pimd/pim_register.c b/pimd/pim_register.c index 6b76f4c49b..1945d99d21 100644 --- a/pimd/pim_register.c +++ b/pimd/pim_register.c @@ -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; } -- 2.39.5