From: Andrew J. Schorr Date: Tue, 27 Feb 2007 13:55:46 +0000 (+0000) Subject: [ospfd] Fix bug: should exit immediately on SIGTERM if OSPF not actually running X-Git-Tag: frr-2.0-rc1~2555 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4056a544eb0b7ea513bca0d70808e671c3f2c25b;p=mirror%2Ffrr.git [ospfd] Fix bug: should exit immediately on SIGTERM if OSPF not actually running 2007-02-27 Andrew J. Schorr * ospfd.c: (ospf_terminate) Exit immediately if ospf is not actually running (e.g. the config file was empty). Fixes bug where SIGTERM would not kill ospfd. --- diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index 35ffd69d49..191288e7c6 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,9 @@ +2007-02-27 Andrew J. Schorr + + * ospfd.c: (ospf_terminate) Exit immediately if ospf is not + actually running (e.g. the config file was empty). Fixes + bug where SIGTERM would not kill ospfd. + 2007-02-26 Paul Jakma * ospf_spf.c: Fix regression introduced with bug #330 fix: The diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index f72295d1cf..159422b47c 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -355,6 +355,10 @@ ospf_terminate (void) SET_FLAG (om->options, OSPF_MASTER_SHUTDOWN); + /* exit immediately if OSPF not actually running */ + if (listcount(om->ospf) == 0) + exit(0); + for (ALL_LIST_ELEMENTS (om->ospf, node, nnode, ospf)) ospf_finish (ospf);