summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-11-12 02:29:06 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2019-11-12 13:56:06 +0100
commit26a0f1e2fe2656c2c5a2115b40172b94569e18a1 (patch)
tree4598ad7d8eb2df25bb2cc2f9a416c8b619edcd3c
parentMerge pull request #5311 from chiragshah6/mdev (diff)
downloadfrr-26a0f1e2fe2656c2c5a2115b40172b94569e18a1.tar.xz
frr-26a0f1e2fe2656c2c5a2115b40172b94569e18a1.zip
pimd: Ignore igmp queries from itself
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>
-rw-r--r--pimd/pim_igmp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index 7dfd26ea6..8737c5fc0 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -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: