summaryrefslogtreecommitdiff
path: root/pimd/pim_igmp.c
diff options
context:
space:
mode:
authorMobashshera Rasool <mrasool@vmware.com>2022-02-06 23:23:21 -0800
committerMobashshera Rasool <mrasool@vmware.com>2022-02-07 01:46:19 -0800
commit5bc4a46b007b14a4b3729f11d0160402b8e89429 (patch)
treedea8e10d7fa922a80fb97bd2968c18820917226c /pimd/pim_igmp.c
parent8dd61ca240ca0c95b6b05d6050f2c2c726219631 (diff)
pimd: Querier to non-querier transistion to be ignored in a case
As per RFC 2236 section 3, when the leave message is received at a querier, it starts sending Query messages for "last Member Query Interval*query count" During this time there should not be any querier to non-querier transition and the same router needs to send the remaning queries. Fixes: #10422 Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Diffstat (limited to 'pimd/pim_igmp.c')
-rw-r--r--pimd/pim_igmp.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index cf7613f4e4..512384d642 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -377,6 +377,30 @@ static int igmp_recv_query(struct gm_sock *igmp, int query_version,
*/
if (ntohl(from.s_addr) < ntohl(igmp->ifaddr.s_addr)) {
+ /* As per RFC 2236 section 3:
+ * When a Querier receives a Leave Group message for a group
+ * that has group members on the reception interface, it sends
+ * [Last Member Query Count] Group-Specific Queries every [Last
+ * Member Query Interval] to the group being left. These
+ * Group-Specific Queries have their Max Response time set to
+ * [Last Member Query Interval]. If no Reports are received
+ * after the response time of the last query expires, the
+ * routers assume that the group has no local members, as above.
+ * Any Querier to non-Querier transition is ignored during this
+ * time; the same router keeps sending the Group-Specific
+ * Queries.
+ */
+ struct gm_group *group;
+
+ group = find_group_by_addr(igmp, group_addr);
+ if (group && group->t_group_query_retransmit_timer) {
+ if (PIM_DEBUG_IGMP_TRACE)
+ zlog_debug(
+ "%s: lower address query packet from %s is ignored when last member query interval timer is running",
+ ifp->name, from_str);
+ return 0;
+ }
+
if (PIM_DEBUG_IGMP_TRACE) {
char ifaddr_str[INET_ADDRSTRLEN];
pim_inet4_dump("<ifaddr?>", igmp->ifaddr, ifaddr_str,