]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: Ensure packet received on vrf interface is configured for pim
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 13 Jun 2017 17:49:38 +0000 (13:49 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 24 Jul 2017 17:51:39 +0000 (13:51 -0400)
In a vrf configuration, when we receive a pim packet we lookup
the correct incoming interface.  There exists a chance that
the correct incoming interface has not been configured to use
pim yet.  gracefully bow out and do nothing with the packet.

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

index 80ce6f066f78a129b1b7393f194a9d64f44c5a96..5b9d6effc8b1cfda5118b6d5f0ef5210b372b9dd 100644 (file)
@@ -327,7 +327,13 @@ static int pim_sock_read(struct thread *t)
                 * it's the right interface because we bind to it
                 */
                ifp = if_lookup_by_index(ifindex, pim_ifp->pim->vrf_id);
-
+               if (!ifp->info) {
+                       if (PIM_DEBUG_PIM_PACKETS)
+                               zlog_debug(
+                                       "%s: Received incoming pim packet on interface not yet configured for pim %s",
+                                       __PRETTY_FUNCTION__, ifp->name);
+                       goto done;
+               }
                int fail = pim_pim_packet(ifp, buf, len);
                if (fail) {
                        if (PIM_DEBUG_PIM_PACKETS)