Per-interface list of addresses, both multicast and unicast, are
authormpi <mpi@openbsd.org>
Mon, 29 May 2017 14:36:22 +0000 (14:36 +0000)
committermpi <mpi@openbsd.org>
Mon, 29 May 2017 14:36:22 +0000 (14:36 +0000)
commitf3c8d50914a0d7408be632f4a866925bf1fe4db8
treee826a437b5681d16787a21fc000434078646962e
parenteeef6ec021155863e209a87113e86fa51fc04356
Per-interface list of addresses, both multicast and unicast, are
currently protected by the NET_LOCK().

They are not accessed in the hot path, so protecting them with a
mutex could be an option.  However since we're now going to run
with a NET_LOCK() for some time, assert that it is held.

IPsec is not yet ready to run without KERNEL_LOCK(), so assert it
is held, even in the forwarding path.

Tested by sthen@, ok visa@, claudio@, bluhm@
sys/netinet/in.c
sys/netinet/in_var.h
sys/netinet/ip_input.c
sys/netinet/ip_output.c
sys/netinet6/ip6_input.c