]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Remove unnecessary check in packet process path
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 10 Feb 2017 20:26:41 +0000 (15:26 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 24 Feb 2017 15:03:40 +0000 (10:03 -0500)
When we get a packet from the network for pim, we do not
need to check to see that it is a pim packet, since that
is what we've asked to receive.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_pim.c

index b81b1b01a70361d100b022836d900a8799f88ea5..e5d5971ce201b53f6bb106a2991e2979944259ef 100644 (file)
@@ -150,13 +150,6 @@ int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len)
   ip_hdr = (struct ip *) buf;
   ip_hlen = ip_hdr->ip_hl << 2; /* ip_hl gives length in 4-byte words */
 
-  if (ip_hdr->ip_p != PIM_IP_PROTO_PIM) {
-    if (PIM_DEBUG_PIM_PACKETS)
-      zlog_debug("IP packet protocol=%d is not PIM=%d",
-                ip_hdr->ip_p, PIM_IP_PROTO_PIM);
-    return -1;
-  }
-
   if (ip_hlen < PIM_IP_HEADER_MIN_LEN) {
     if (PIM_DEBUG_PIM_PACKETS)
       zlog_debug("IP packet header size=%zu shorter than minimum=%d",