]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: Ignore igmp queries from itself
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 12 Nov 2019 01:29:06 +0000 (20:29 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 12 Nov 2019 12:56:06 +0000 (07:56 -0500)
We are seeing situations where PIM is sending a IGMP v3 query
and immediately receiving back up the pim kernel interface the
query from itself:

from `show int brief`:
swp7 up default 192.168.202.1/24

We are also receiving these debugs:
2019-11-11T20:52:40.452307+00:00 leaf02 pimd[1592]: Send IGMPv3 query to 224.4.0.8 on swp7 for group 224.4.0.8, sources=0 msg_size=12 s_flag=0 QRV=2 QQI=125 QQIC=7d
2019-11-11T20:52:40.452430+00:00 leaf02 pimd[1592]: pim_mroute_msg(default): igmp kernel upcall on swp7(0x55eaa7dc7dc0) for 192.168.202.1 -> 224.4.11.123
2019-11-11T20:52:40.452574+00:00 leaf02 pimd[1592]: Recv IP packet from 192.168.202.1 to 224.4.11.123 on swp7: size=40 ip_header_size=24 ip_proto=2
2019-11-11T20:52:40.452699+00:00 leaf02 pimd[1592]: Recv IGMP packet from 192.168.202.1 to 224.4.11.123 on swp7: ttl=1 msg_type=17 msg_size=16
2019-11-11T20:52:40.452824+00:00 leaf02 pimd[1592]: Recv IGMP query v3 from 192.168.202.1 on swp7 for group 224.4.11.123

This query is causing us to do some weird gyrations around the IGMP state machine for handling
queries.  Let's just prevent it from happening.

Ticket: CM-27247
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_igmp.c

index 7dfd26ea655d9c67662c5510ebf0313c15876223..8737c5fc095e280321d3f8d788dabb2937638010 100644 (file)
@@ -312,6 +312,13 @@ static int igmp_recv_query(struct igmp_sock *igmp, int query_version,
                return 0;
        }
 
+       if (if_lookup_address(&from, AF_INET, ifp->vrf_id)) {
+               if (PIM_DEBUG_IGMP_PACKETS)
+                       zlog_debug("Recv IGMP query on interface: %s from ourself %s",
+                                  ifp->name, from_str);
+               return 0;
+       }
+
        /* Collecting IGMP Rx stats */
        switch (query_version) {
        case 1: