From: Donald Sharp Date: Tue, 20 Oct 2015 15:26:24 +0000 (-0700) Subject: pimd: Cause NOCACHE event to create WHOLEPKT events for pimd X-Git-Tag: frr-2.0-rc1~821 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8813406fe9d83b07aab640c27c5c8ede29ea7ada;p=matthieu%2Ffrr.git pimd: Cause NOCACHE event to create WHOLEPKT events for pimd 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 --- diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index f0830c1e7b..481f81e4ee 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -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; }