From 5aed4d137623a1995b8b8d33dafa0a52177dab31 Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Sat, 5 Nov 2022 21:33:01 +0800 Subject: [PATCH] pimd: avoid one EC log Saw this EC log: ``` PIM: [WX4HZ-FA72S][EC 100663307] pim_rp_find_match_group: BUG We should have found default group information ``` The root cause is group address of "0.0.0.0" is wrongly introduced into `pim_rp_find_match_group()`. So add a check to avoid it. Signed-off-by: anlan_cs --- pimd/pim_igmp_mtrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pimd/pim_igmp_mtrace.c b/pimd/pim_igmp_mtrace.c index f6c23c8e8..1a90b46de 100644 --- a/pimd/pim_igmp_mtrace.c +++ b/pimd/pim_igmp_mtrace.c @@ -770,7 +770,8 @@ int igmp_mtrace_recv_qry_req(struct gm_sock *igmp, struct ip *ip_hdr, } /* 6.2.2 8. If this router is the Rendez-vous Point */ - if (pim_rp_i_am_rp(pim, mtracep->grp_addr)) { + if (mtracep->grp_addr.s_addr != INADDR_ANY && + pim_rp_i_am_rp(pim, mtracep->grp_addr)) { mtrace_rsp_set_fwd_code(rspp, MTRACE_FWD_CODE_REACHED_RP); /* 7.7.1. PIM-SM ...RP has not performed source-specific join */ if (rspp->src_mask == MTRACE_SRC_MASK_GROUP) -- 2.39.5