From: Donald Sharp Date: Mon, 22 Aug 2016 18:59:24 +0000 (-0400) Subject: pimd: On RP Allow no output interfaces X-Git-Tag: frr-3.0-branchpoint~64^2~10^2~273 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=51e828334e98310b1763c9f9514d9684aba17f76;p=mirror%2Ffrr.git pimd: On RP Allow no output interfaces On the RP when we receive a register packet for the same interface that we received the *,G join on allow the RP to receive the packets but to do nothing with them. Additionally check the last_used values even if the ioctl fails. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 65696f6d33..32d48748ab 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -364,6 +364,10 @@ pim_mroute_msg_wrvifwhole (int fd, struct interface *ifp, const char *buf) //No if channel, but upstream we are at the RP. pim_nexthop_lookup (&source, up->upstream_register); pim_register_stop_send(source.interface, &sg, pim_ifp->primary_address, up->upstream_register); + if (!up->channel_oil) + up->channel_oil = pim_channel_oil_add (&sg, pim_ifp->mroute_vif_index); + if (!up->channel_oil->installed) + pim_mroute_add (up->channel_oil); //Send S bit down the join. up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE; } @@ -754,6 +758,7 @@ pim_mroute_update_counters (struct channel_oil *c_oil) c_oil->cc.oldwrong_if = c_oil->cc.wrong_if; c_oil->cc.oldlastused = c_oil->cc.lastused; + pim_zlookup_sg_statistics (c_oil); if (ioctl (qpim_mroute_socket_fd, SIOCGETSGCNT, &sgreq)) { char group_str[100]; @@ -771,7 +776,6 @@ pim_mroute_update_counters (struct channel_oil *c_oil) return; } - pim_zlookup_sg_statistics (c_oil); c_oil->cc.pktcnt = sgreq.pktcnt; c_oil->cc.bytecnt = sgreq.bytecnt; c_oil->cc.wrong_if = sgreq.wrong_if; diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 034878d20d..e69fec0793 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -1058,8 +1058,7 @@ pim_upstream_inherited_olist (struct pim_upstream *up) } } - if (output_intf) - pim_upstream_switch (up, PIM_UPSTREAM_JOINED); + pim_upstream_switch (up, PIM_UPSTREAM_JOINED); return output_intf; }