summaryrefslogtreecommitdiff
path: root/ospfd/ospf_opaque.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_opaque.c')
-rw-r--r--ospfd/ospf_opaque.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c
index 414ec743..d0d1be3d 100644
--- a/ospfd/ospf_opaque.c
+++ b/ospfd/ospf_opaque.c
@@ -69,6 +69,7 @@
#ifdef SUPPORT_OSPF_API
int ospf_apiserver_init (void);
void ospf_apiserver_term (void);
+extern int ospf_apiserver_enable;
#endif /* SUPPORT_OSPF_API */
static void ospf_opaque_register_vty (void);
@@ -91,7 +92,7 @@ ospf_opaque_init (void)
#endif /* HAVE_OSPF_TE */
#ifdef SUPPORT_OSPF_API
- if (ospf_apiserver_init () != 0)
+ if ((ospf_apiserver_enable) && (ospf_apiserver_init () != 0))
exit (1);
#endif /* SUPPORT_OSPF_API */