diff options
Diffstat (limited to 'ospfd/ospf_main.c')
| -rw-r--r-- | ospfd/ospf_main.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/ospfd/ospf_main.c b/ospfd/ospf_main.c index 6be5486b55..6a90dbff11 100644 --- a/ospfd/ospf_main.c +++ b/ospfd/ospf_main.c @@ -146,9 +146,6 @@ FRR_DAEMON_INFO(ospfd, OSPF, .vty_port = OSPF_VTY_PORT, /* OSPFd main routine. */ int main(int argc, char **argv) { - unsigned short instance = 0; - bool created = false; - #ifdef SUPPORT_OSPF_API /* OSPF apiserver is disabled by default. */ ospf_apiserver_enable = 0; @@ -169,8 +166,8 @@ int main(int argc, char **argv) switch (opt) { case 'n': - ospfd_di.instance = instance = atoi(optarg); - if (instance < 1) + ospfd_di.instance = ospf_instance = atoi(optarg); + if (ospf_instance < 1) exit(0); break; case 0: @@ -208,7 +205,7 @@ int main(int argc, char **argv) /* OSPFd inits. */ ospf_if_init(); - ospf_zebra_init(master, instance); + ospf_zebra_init(master, ospf_instance); /* OSPF vty inits. */ ospf_vty_init(); @@ -227,17 +224,6 @@ int main(int argc, char **argv) /* OSPF errors init */ ospf_error_init(); - /* - * Need to initialize the default ospf structure, so the interface mode - * commands can be duly processed if they are received before 'router - * ospf', when ospfd is restarted - */ - if (instance && !ospf_get_instance(instance, &created)) { - flog_err(EC_OSPF_INIT_FAIL, "OSPF instance init failed: %s", - strerror(errno)); - exit(1); - } - frr_config_fork(); frr_run(master); |
