summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2012-12-04 11:11:41 -0800
committerScott Feldman <sfeldma@cumulusnetworks.com>2013-01-07 09:59:46 -0800
commit822d8f55199c0aee32c64f91532f637694d30e11 (patch)
treedb881758131d63c95b0bca943ba52e2b33228236 /ospfd
parent2345a2221aa0a02b96846beab6088815f41e791b (diff)
ospf: fix apiserver enable
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>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c
index 1448c7d8..6d58b4ea 100644
--- a/ospfd/ospf_main.c
+++ b/ospfd/ospf_main.c
@@ -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;