]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Add a check for needing spt bit in register_recv
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 16 Jun 2017 19:23:49 +0000 (15:23 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 24 Jul 2017 17:51:40 +0000 (13:51 -0400)
When we receive a register message for an existing S,G
and the SPT bit is not set, then do a quick check against
the S,G to see if we have counters updated.  This is added
because the existing S,G wheel_timer only updates every
31 seconds and it is possible for a Null Register to
have come in before that first 30 second timer pops.

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

index 744bc8e94c26c6fa06e2d1f7b2a69ec0daf0eff0..605dd43d5e7f8a9e443a2ab2a337e3506ee7e479 100644 (file)
@@ -377,6 +377,28 @@ int pim_register_recv(struct interface *ifp, struct in_addr dest_addr,
                        }
 
                        upstream->upstream_register = src_addr;
+               } else {
+                       /*
+                        * If the FHR has set a very very fast register timer
+                        * there exists a possibility that the incoming NULL
+                        * register
+                        * is happening before we set the spt bit.  If so
+                        * Do a quick check to update the counters and
+                        * then set the spt bit as appropriate
+                        */
+                       if (upstream->sptbit != PIM_UPSTREAM_SPTBIT_TRUE) {
+                               pim_mroute_update_counters(
+                                       upstream->channel_oil);
+                               /*
+                                * Have we seen packets?
+                                */
+                               if (upstream->channel_oil->cc.oldpktcnt
+                                   < upstream->channel_oil->cc.pktcnt)
+                                       pim_upstream_set_sptbit(
+                                               upstream,
+                                               upstream->rpf.source_nexthop
+                                                       .interface);
+                       }
                }
 
                if ((upstream->sptbit == PIM_UPSTREAM_SPTBIT_TRUE)