summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6d.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2020-10-20 22:43:31 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2020-10-20 22:47:17 +0300
commitaebb5bfaf7e3cc22b01c9066af2534e5029bb651 (patch)
treeb0a1c7447adb9c28394e31d3e2c987d8ac317bd2 /ospf6d/ospf6d.c
parent175b6f3585307f1ffd47eacabb0275c33a8405be (diff)
ospf6d: fix crash on message receive
OSPF6 daemon starts listening on its socket and reading messages right after the initialization before the ospf6 router is created. If any message is received, ospf6d crashes because ospf6_receive doesn't NULL-check ospf6 pointer. Fix this by opening the socket and reading messages only after the creation of ospf6 router. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospf6d/ospf6d.c')
-rw-r--r--ospf6d/ospf6d.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index f61adcd328..3d53608853 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -1267,10 +1267,6 @@ void ospf6_init(void)
VIEW_NODE,
&show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd);
install_element(VIEW_NODE, &show_ipv6_ospf6_database_aggr_router_cmd);
-
- /* Make ospf protocol socket. */
- ospf6_serv_sock();
- thread_add_read(master, ospf6_receive, NULL, ospf6_sock, NULL);
}
void ospf6_clean(void)