]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Fix RP upstream Prune -> join state
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 19 Aug 2016 19:21:45 +0000 (15:21 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:07 +0000 (20:26 -0500)
This fix allows the RP to transition from a Prune'd to Join
state on reception of proper control messages.

Additionally it was noticed on if down -> if up transitions
the prune then join message was going out the wrong interface.

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

index 37b900688e57d1bfa7be7a366d2b6710a420284d..68c773d0c87652cf1c8f43210cdbe0ce7fcc709b 100644 (file)
@@ -393,6 +393,12 @@ pim_upstream_switch(struct pim_upstream *up,
   switch (up->join_state)
     {
     case PIM_UPSTREAM_PRUNE:
+      if (!up->fhr)
+        {
+          up->join_state       = new_state;
+          up->state_transition = pim_time_monotonic_sec ();
+        }
+      break;
     case PIM_UPSTREAM_JOIN_PENDING:
       break;
     case PIM_UPSTREAM_NOTJOINED:
index 94cd6589323a257d50200a236bc6a7a90c497b23..b171fbb7021738562ed577ed7d7cd43d56672581 100644 (file)
@@ -331,8 +331,10 @@ static void scan_upstream_rpf_cache()
 
   for (ALL_LIST_ELEMENTS(qpim_upstream_list, up_node, up_nextnode, up)) {
     struct in_addr      old_rpf_addr;
+    struct interface    *old_interface;
     enum pim_rpf_result rpf_result;
 
+    old_interface = up->rpf.source_nexthop.interface;
     rpf_result = pim_rpf_update(up, &old_rpf_addr);
     if (rpf_result == PIM_RPF_FAILURE)
       continue;
@@ -364,10 +366,8 @@ static void scan_upstream_rpf_cache()
 
     
        /* send Prune(S,G) to the old upstream neighbor */
-       pim_joinprune_send(up->rpf.source_nexthop.interface,
-                          old_rpf_addr,
-                          &up->sg,
-                          0 /* prune */);
+       pim_joinprune_send(old_interface, old_rpf_addr,
+                          &up->sg, 0 /* prune */);
        
        /* send Join(S,G) to the current upstream neighbor */
        pim_joinprune_send(up->rpf.source_nexthop.interface,