From 822d8f55199c0aee32c64f91532f637694d30e11 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 4 Dec 2012 11:11:41 -0800 Subject: 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 Signed-off-by: David Lamparter Signed-off-by: Scott Feldman --- ospfd/ospf_main.c | 10 +++++----- 1 file 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; -- cgit v1.2.1