diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-29 14:31:19 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-06-29 14:53:18 +0200 |
commit | 5bbcd1f0fd82e0e982700dbc12dd959629e91b58 (patch) | |
tree | 68af8011b94b5a9cd9fec093cb382fd67220c439 /pimd | |
parent | pimd: Make pim_channel_add_oif failures debugs (diff) | |
download | frr-5bbcd1f0fd82e0e982700dbc12dd959629e91b58.tar.xz frr-5bbcd1f0fd82e0e982700dbc12dd959629e91b58.zip |
pimd: Prevent igmp packet loopback.
pim is joining the 224.0.0.13 and 224.0.0.22 groups
This is causing the creation of (*, 224.0.0.13) and
(*, 224.0.0.22) multicast routes which are immediately
sent to the pim network.
If we are the originator of the igmp report than
there is no need to accept the packet for
processing.
Ticket: CM-11397
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd')
-rw-r--r-- | pimd/pim_igmp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index 176470e20..2d1dea69a 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -717,6 +717,19 @@ int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len) from_str, to_str, igmp->interface->name, len, ip_hlen, ip_hdr->ip_p); } + /* + * When pim starts up we are joining the 224.0.0.13 and 224.0.0.22 multicast + * groups. This is causing the kernel to create a igmp packet that pim + * turns around and receives. Therefor if we are the originator + * of the igmp packet then we can probably just ignore it. + */ + if (ip_hdr->ip_src.s_addr == igmp->ifaddr.s_addr) + { + if (PIM_DEBUG_IGMP_PACKETS) + zlog_debug ("Received IGMP packet from myself, ignoring"); + return -1; + } + if (ip_hdr->ip_p != PIM_IP_PROTO_IGMP) { zlog_warn("IP packet protocol=%d is not IGMP=%d", ip_hdr->ip_p, PIM_IP_PROTO_IGMP); |