]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: On RP Allow no output interfaces
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 22 Aug 2016 18:59:24 +0000 (14:59 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:07 +0000 (20:26 -0500)
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 <sharpd@cumulusnetworks.com>
pimd/pim_mroute.c
pimd/pim_upstream.c

index 65696f6d33c536818307b51f6a12d9bb433dc6ec..32d48748aba7f25bf3b02f5bd81d0cbbfe403ed6 100644 (file)
@@ -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;
index 034878d20da829c5f5a8c19363bd5043c73db24a..e69fec079327e4c28adbf2ea1abe891edb15be9f 100644 (file)
@@ -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;
 }