[quagga-dev 9961] [PATCH] ospfd: fix apiserver enable

David Lamparter equinox at opensourcerouting.org
Tue Nov 6 03:58:56 GMT 2012


The ospf_apiserver_enable flag was being cleared _after_ the "-a"
command-line option set it to 1.  Move up the initialisation, so
enabling the OSPF API is actually possible.

Reported-by: Rosario Mattera <rosmattera at gmail.com>
Signed-off-by: David Lamparter <equinox at opensourcerouting.org>
---
just converted report to patch.  -David
---
 ospfd/ospf_main.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 1448c7d..3c02df2 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -188,6 +188,11 @@ main (int argc, char **argv)
   struct thread thread;
   int dryrun = 0;
 
+#ifdef SUPPORT_OSPF_API
+  /* OSPF apiserver is disabled by default. */
+  ospf_apiserver_enable = 0;
+#endif /* SUPPORT_OSPF_API */
+
   /* Set umask before anything for security */
   umask (0027);
 
@@ -275,11 +280,6 @@ main (int argc, char **argv)
   /* OSPF master init. */
   ospf_master_init ();
 
-#ifdef SUPPORT_OSPF_API
-  /* OSPF apiserver is disabled by default. */
-  ospf_apiserver_enable = 0;
-#endif /* SUPPORT_OSPF_API */
-
   /* Initializations. */
   master = om->master;
 
-- 
1.7.8.6




More information about the Quagga-dev mailing list