From: kn Date: Mon, 28 Nov 2022 13:10:58 +0000 (+0000) Subject: Remove useless nd6_init_done X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=eb50a1c069c220b127aa07a55c24fb0db23bf1a7;p=openbsd Remove useless nd6_init_done Only ip6_init() calls nd6_init(), exactly once, just like it calls frag6_init() which on the other hand does not have some fra6_init_done to guard against itself. Like all other domains, ip6_init() is called in domaininit(), early in the kernel's main(). This variable was probably never useful and stems from nd6.c r1.1: bring in KAME IPv6 code, dated 19991208. OK mvs --- diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 4e9c4b9aa16..18b590aa738 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.254 2022/11/25 15:03:24 kn Exp $ */ +/* $OpenBSD: nd6.c,v 1.255 2022/11/28 13:10:58 kn Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -104,21 +104,12 @@ struct task nd6_expire_task; void nd6_init(void) { - static int nd6_init_done = 0; - - if (nd6_init_done) { - log(LOG_NOTICE, "%s called more than once\n", __func__); - return; - } - TAILQ_INIT(&nd6_list); pool_init(&nd6_pool, sizeof(struct llinfo_nd6), 0, IPL_SOFTNET, 0, "nd6", NULL); task_set(&nd6_expire_task, nd6_expire, NULL); - nd6_init_done = 1; - /* start timer */ timeout_set_proc(&nd6_timer_to, nd6_timer, NULL); timeout_set_proc(&nd6_slowtimo_ch, nd6_slowtimo, NULL);