summaryrefslogtreecommitdiff
path: root/pimd/pim_mroute.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-12-20 07:57:28 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2020-03-06 16:02:43 -0500
commita054f6d73e43f70e7e10f026d7cc3f3b09f3fc09 (patch)
tree8077969cd3545ae46d85a8057507383f46b518e6 /pimd/pim_mroute.c
parent9dc1cb0424d5b7033dd9a58aaf2165d302e20fd6 (diff)
pimd: There is nothing to do with a WRVIFWHOLE for iifp of pimreg
When the WRVIFWHOLE callback is made with a iifp of the pimreg device we *know* that the packet is a PIM Register packet ( see net/ipv4/ipmr.c for kernel behavior ). As such we know that we will shortly read the pim register packet and handle it through those mechanics. There is nothing to do here so we can move along. Ticket: CM-27729 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_mroute.c')
-rw-r--r--pimd/pim_mroute.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c
index 14f8a8312b..d162f0f52e 100644
--- a/pimd/pim_mroute.c
+++ b/pimd/pim_mroute.c
@@ -443,6 +443,7 @@ static int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp,
{
const struct ip *ip_hdr = (const struct ip *)buf;
struct pim_interface *pim_ifp;
+ struct pim_instance *pim;
struct pim_ifchannel *ch;
struct pim_upstream *up;
struct prefix_sg star_g;
@@ -465,16 +466,18 @@ static int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp,
star_g = sg;
star_g.src.s_addr = INADDR_ANY;
-#if 0
- ch = pim_ifchannel_find(ifp, &star_g);
- if (ch)
- {
- if (PIM_DEBUG_MROUTE)
- zlog_debug ("WRVIFWHOLE (*,G)=%s found ifchannel on interface %s",
- pim_str_sg_dump (&star_g), ifp->name);
- return -1;
- }
-#endif
+
+ pim = pim_ifp->pim;
+ /*
+ * If the incoming interface is the pimreg, then
+ * we know the callback is associated with a pim register
+ * packet and there is nothing to do here as that
+ * normal pim processing will see the packet and allow
+ * us to do the right thing.
+ */
+ if (ifp == pim->regiface) {
+ return 0;
+ }
up = pim_upstream_find(pim_ifp->pim, &sg);
if (up) {