summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-07-04 13:46:14 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-07-04 13:46:14 +0000
commite55dd53bca98a032a583950320cc1367a0685bee (patch)
tree217f9f8e6d4c9426ba36ae0bcf9af3d3949347a4
parentba0beb4a846056301d6baa7f67002c6705084b40 (diff)
[ospfd] trivial cleanup of nsm_timer_set
2006-07-02 Paul Jakma <paul.jakma@sun.com> * ospf_nsm.c: (nsm_timer_set) ls_req timer should be OFF in early states. Compact several identical sections. Set inactivity timer to OFF for Down, for documentary purposes.
-rw-r--r--ospfd/ChangeLog4
-rw-r--r--ospfd/ospf_nsm.c15
2 files changed, 10 insertions, 9 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index e3805c82..e6d04f32 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -7,6 +7,10 @@
next_state if the NSM tables do not indicate next_state is
conditional, log warning if one tries - existing code
appears fine though.
+ (nsm_timer_set) ls_req timer should be OFF in early states.
+ Compact several identical sections.
+ Set inactivity timer to OFF for Down, for documentary
+ purposes.
2006-06-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index 73ed088f..8c7c11a8 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -103,24 +103,21 @@ nsm_timer_set (struct ospf_neighbor *nbr)
switch (nbr->state)
{
case NSM_Down:
- OSPF_NSM_TIMER_OFF (nbr->t_db_desc);
- OSPF_NSM_TIMER_OFF (nbr->t_ls_upd);
- break;
+ /* This is here for documentation purposes, don't actually get here
+ * as Down neighbours are deleted typically, see nsm_kill_nbr
+ */
+ OSPF_NSM_TIMER_OFF (nbr->t_inactivity);
case NSM_Attempt:
- OSPF_NSM_TIMER_OFF (nbr->t_db_desc);
- OSPF_NSM_TIMER_OFF (nbr->t_ls_upd);
- break;
case NSM_Init:
- OSPF_NSM_TIMER_OFF (nbr->t_db_desc);
- OSPF_NSM_TIMER_OFF (nbr->t_ls_upd);
- break;
case NSM_TwoWay:
OSPF_NSM_TIMER_OFF (nbr->t_db_desc);
OSPF_NSM_TIMER_OFF (nbr->t_ls_upd);
+ OSPF_NSM_TIMER_OFF (nbr->t_ls_req);
break;
case NSM_ExStart:
OSPF_NSM_TIMER_ON (nbr->t_db_desc, ospf_db_desc_timer, nbr->v_db_desc);
OSPF_NSM_TIMER_OFF (nbr->t_ls_upd);
+ OSPF_NSM_TIMER_OFF (nbr->t_ls_req);
break;
case NSM_Exchange:
OSPF_NSM_TIMER_ON (nbr->t_ls_upd, ospf_ls_upd_timer, nbr->v_ls_upd);