summaryrefslogtreecommitdiffstats
path: root/pimd/pim_upstream.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-11-03 18:51:18 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-22 02:26:13 +0100
commite5b6b229976e3ac9dc8f019337acf21391e7cf2f (patch)
tree69f41bd67e7229bc4041a4ad457c1b8e6d86dac3 /pimd/pim_upstream.c
parentpimd: Abstract setting of the spt bit a bit more (diff)
downloadfrr-e5b6b229976e3ac9dc8f019337acf21391e7cf2f.tar.xz
frr-e5b6b229976e3ac9dc8f019337acf21391e7cf2f.zip
pimd: No need to reset uptime if state is the same
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>
Diffstat (limited to '')
-rw-r--r--pimd/pim_upstream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c
index a070e92e4..3d592460d 100644
--- a/pimd/pim_upstream.c
+++ b/pimd/pim_upstream.c
@@ -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;
}