]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf: fix apiserver enable
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 4 Dec 2012 19:11:41 +0000 (11:11 -0800)
committerScott Feldman <sfeldma@cumulusnetworks.com>
Mon, 7 Jan 2013 17:59:46 +0000 (09:59 -0800)
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@gmail.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
ospfd/ospf_main.c

index 1448c7d8e3763d549087eb65306edb4fe3cc9378..6d58b4ead199c9bf7c4cb98c1516956886f98174 100644 (file)
@@ -191,6 +191,11 @@ main (int argc, char **argv)
   /* Set umask before anything for security */
   umask (0027);
 
+#ifdef SUPPORT_OSPF_API
+  /* OSPF apiserver is disabled by default. */
+  ospf_apiserver_enable = 0;
+#endif /* SUPPORT_OSPF_API */
+
   /* get program name */
   progname = ((p = strrchr (argv[0], '/')) ? ++p : argv[0]);
 
@@ -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;