]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: No need to reset uptime if state is the same
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 3 Nov 2016 17:51:18 +0000 (13:51 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:13 +0000 (20:26 -0500)
Do not reset the time the mroute has been in it's
current state if we get a transition to the same state.

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

index a070e92e45a2fa7a4279da55dcd567112c46940d..3d592460dc1052f1ec46b131bc66e9e19e98bde1 100644 (file)
@@ -452,7 +452,8 @@ pim_upstream_switch(struct pim_upstream *up,
     case PIM_UPSTREAM_NOTJOINED:
     case PIM_UPSTREAM_JOINED:
       up->join_state       = new_state;
-      up->state_transition = pim_time_monotonic_sec();
+      if (old_state != new_state)
+        up->state_transition = pim_time_monotonic_sec();
 
       break;
     }