diff options
author | ajs <ajs> | 2007-02-27 13:55:46 +0000 |
---|---|---|
committer | ajs <ajs> | 2007-02-27 13:55:46 +0000 |
commit | f7a0808035fc2121cc82e4c9910296009e888309 (patch) | |
tree | 929da6d789c4d73ea9fe4115f7c8f303126003b4 /ospfd | |
parent | 136021d0b10952aa4982b6bdd615c7217ba62cc4 (diff) | |
download | quagga-f7a0808035fc2121cc82e4c9910296009e888309.tar.bz2 quagga-f7a0808035fc2121cc82e4c9910296009e888309.tar.xz |
[ospfd] Fix bug: should exit immediately on SIGTERM if OSPF not actually running
2007-02-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* 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.
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ChangeLog | 6 | ||||
-rw-r--r-- | ospfd/ospfd.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index 35ffd69d..191288e7 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,9 @@ +2007-02-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu> + + * 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 <paul.jakma@sun.com> * ospf_spf.c: Fix regression introduced with bug #330 fix: The diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index f72295d1..159422b4 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); |