]> git.proxmox.com Git - mirror_frr.git/commitdiff
[ospfd] Fix bug: should exit immediately on SIGTERM if OSPF not actually running
authorAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Tue, 27 Feb 2007 13:55:46 +0000 (13:55 +0000)
committerAndrew J. Schorr <ajschorr@alumni.princeton.edu>
Tue, 27 Feb 2007 13:55:46 +0000 (13:55 +0000)
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.

ospfd/ChangeLog
ospfd/ospfd.c

index 35ffd69d4978e4f43dd1d8d9135fb0efa1902ffd..191288e7c692d256008151d3cf75d65290949f27 100644 (file)
@@ -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
index f72295d1cf294e79f4ac0649625d048432e0be05..159422b47c6a1758c596470a000452df7ff47185 100644 (file)
@@ -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);