diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2012-12-04 11:11:41 -0800 |
---|---|---|
committer | Scott Feldman <sfeldma@cumulusnetworks.com> | 2013-01-07 09:59:46 -0800 |
commit | 822d8f55199c0aee32c64f91532f637694d30e11 (patch) | |
tree | db881758131d63c95b0bca943ba52e2b33228236 | |
parent | 2345a2221aa0a02b96846beab6088815f41e791b (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>
-rw-r--r-- | 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 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; |