summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog5
-rw-r--r--ospfd/ospf_vty.c6
-rw-r--r--ospfd/ospfd.c38
-rw-r--r--ospfd/ospfd.h4
4 files changed, 31 insertions, 22 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 064ed839..cf6fef7f 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -2,6 +2,11 @@
* ospf_api.c: (struct opaque_lsa) change from gcc zero-length
array to C99 incomplete type array.
+ * (general) s/graceful/deferred/ in all files, the former term
+ is confusing wrt OSPF Graceful-Restart.
+ * ospfd.c: (ospf_deferred_shutdown_check) dont return
+ a function which returns void. SOS complains about this.
+ (ospf_finish)
2005-11-20 Paul Jakma <paul.jakma@sun.com>
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 385eb8d4..cc66d119 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -2606,9 +2606,9 @@ DEFUN (show_ip_ospf,
VTY_NEWLINE);
/* Graceful shutdown */
- if (ospf->t_graceful_shutdown)
- vty_out (vty, " Graceful shutdown in progress, %s remaining%s",
- ospf_timer_dump (ospf->t_graceful_shutdown,
+ if (ospf->t_deferred_shutdown)
+ vty_out (vty, " Deferred shutdown in progress, %s remaining%s",
+ ospf_timer_dump (ospf->t_deferred_shutdown,
timebuf, sizeof (timebuf)), VTY_NEWLINE);
/* Show capability. */
vty_out (vty, " Supports only single TOS (TOS0) routes%s", VTY_NEWLINE);
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index 7c9fb8f0..d73d7836 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -257,19 +257,19 @@ ospf_get ()
return ospf;
}
-/* Handle the second half of graceful shutdown. This is called either
- * from the graceful-shutdown timer thread, or directly through
- * ospf_graceful_shutdown_check.
+/* Handle the second half of deferred shutdown. This is called either
+ * from the deferred-shutdown timer thread, or directly through
+ * ospf_deferred_shutdown_check.
*
* Function is to cleanup G-R state, if required then call ospf_finish_final
* to complete shutdown of this ospf instance. Possibly exit if the
* whole process is being shutdown and this was the last OSPF instance.
*/
static void
-ospf_graceful_shutdown_finish (struct ospf *ospf)
+ospf_deferred_shutdown_finish (struct ospf *ospf)
{
ospf->stub_router_shutdown_time = OSPF_STUB_ROUTER_UNCONFIGURED;
- OSPF_TIMER_OFF (ospf->t_graceful_shutdown);
+ OSPF_TIMER_OFF (ospf->t_deferred_shutdown);
ospf_finish_final (ospf);
@@ -285,27 +285,27 @@ ospf_graceful_shutdown_finish (struct ospf *ospf)
/* Timer thread for G-R */
static int
-ospf_graceful_shutdown_timer (struct thread *t)
+ospf_deferred_shutdown_timer (struct thread *t)
{
struct ospf *ospf = THREAD_ARG(t);
- ospf_graceful_shutdown_finish (ospf);
+ ospf_deferred_shutdown_finish (ospf);
return 0;
}
-/* Check whether graceful-shutdown must be scheduled, otherwise call
+/* Check whether deferred-shutdown must be scheduled, otherwise call
* down directly into second-half of instance shutdown.
*/
static void
-ospf_graceful_shutdown_check (struct ospf *ospf)
+ospf_deferred_shutdown_check (struct ospf *ospf)
{
unsigned long timeout;
struct listnode *ln;
struct ospf_area *area;
- /* graceful shutdown already running? */
- if (ospf->t_graceful_shutdown)
+ /* deferred shutdown already running? */
+ if (ospf->t_deferred_shutdown)
return;
/* Should we try push out max-metric LSAs? */
@@ -321,10 +321,13 @@ ospf_graceful_shutdown_check (struct ospf *ospf)
timeout = ospf->stub_router_shutdown_time;
}
else
- /* No timer needed */
- return ospf_graceful_shutdown_finish (ospf);
+ {
+ /* No timer needed */
+ ospf_deferred_shutdown_finish (ospf);
+ return;
+ }
- OSPF_TIMER_ON (ospf->t_graceful_shutdown, ospf_graceful_shutdown_timer,
+ OSPF_TIMER_ON (ospf->t_deferred_shutdown, ospf_deferred_shutdown_timer,
timeout);
return;
}
@@ -354,13 +357,14 @@ ospf_terminate (void)
void
ospf_finish (struct ospf *ospf)
{
- /* let graceful shutdown decide */
- return ospf_graceful_shutdown_check (ospf);
+ /* let deferred shutdown decide */
+ ospf_deferred_shutdown_check (ospf);
- /* if ospf_graceful_shutdown returns, then ospf_finish_final is
+ /* if ospf_deferred_shutdown returns, then ospf_finish_final is
* deferred to expiry of G-S timer thread. Return back up, hopefully
* to thread scheduler.
*/
+ return;
}
/* Final cleanup of ospf instance */
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index ebacc1b2..f2a61094 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -150,7 +150,7 @@ struct ospf_master
/* Various OSPF global configuration. */
u_char options;
-#define OSPF_MASTER_SHUTDOWN (1 << 0) /* flag for ospf_finish / graceful-shutdown */
+#define OSPF_MASTER_SHUTDOWN (1 << 0) /* deferred-shutdown */
};
/* OSPF instance structure. */
@@ -258,7 +258,7 @@ struct ospf
#endif /* HAVE_OPAQUE_LSA */
struct thread *t_maxage; /* MaxAge LSA remover timer. */
struct thread *t_maxage_walker; /* MaxAge LSA checking timer. */
- struct thread *t_graceful_shutdown; /* Graceful/stub-router shutdown timer*/
+ struct thread *t_deferred_shutdown; /* deferred/stub-router shutdown timer*/
struct thread *t_write;
struct thread *t_read;