From 51e828334e98310b1763c9f9514d9684aba17f76 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 22 Aug 2016 14:59:24 -0400 Subject: [PATCH] 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 --- pimd/pim_mroute.c | 6 +++++- pimd/pim_upstream.c | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index 65696f6d3..32d48748a 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 034878d20..e69fec079 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; } -- 2.39.5