summaryrefslogtreecommitdiff
path: root/ospfd/ospf_nsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_nsm.c')
-rw-r--r--ospfd/ospf_nsm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index ff0a52d0..8329a4f3 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -615,8 +615,14 @@ nsm_notice_state_change (struct ospf_neighbor *nbr, int next_state, int event)
LOOKUP (ospf_nsm_state_msg, next_state),
ospf_nsm_event_str [event]);
- nbr->ts_last_change = recent_time;
- nbr->last_event_str = ospf_nsm_event_str [event];
+ /* Advance in NSM */
+ if (next_state > nbr->state)
+ nbr->ts_last_progress = recent_time;
+ else /* regression in NSM */
+ {
+ nbr->ts_last_regress = recent_time;
+ nbr->last_regress_str = ospf_nsm_event_str [event];
+ }
#ifdef HAVE_SNMP
/* Terminal state or regression */