]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Cause NOCACHE event to create WHOLEPKT events for pimd
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 20 Oct 2015 15:26:24 +0000 (08:26 -0700)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 26 May 2016 00:38:34 +0000 (20:38 -0400)
pimd needs the ability to send the multicast packet to the RP.
This code causes the incoming unknown multicast packet to
be send to pimd so it can be sent as a REGISTER packet towards
the RP.

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

index f0830c1e7b2050c0753d2d1688e2ae0ddcf6011c..481f81e4ee57fc5434010d80261b753741a98af0 100644 (file)
@@ -71,6 +71,20 @@ static int
 pim_mroute_msg_nocache (int fd, struct interface *ifp, const struct igmpmsg *msg,
                        const char *src_str, const char *grp_str)
 {
+  struct mfcctl mc;
+
+  /*
+   * This is just a hack to get the (S,G) received packet up into
+   * our user space so that we can register it.
+   *
+   * Once we run into a few more issues than we'll fix this.
+   */
+  memset(&mc, 0, sizeof(struct mfcctl));
+  mc.mfcc_origin   = msg->im_src;
+  mc.mfcc_mcastgrp = msg->im_dst;
+  mc.mfcc_parent   = ifp->ifindex;
+  mc.mfcc_ttls[MAXVIFS-1] = 1;
+  pim_mroute_add(&mc);
   return 0;
 }