summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-06-25 14:44:00 +0000
committerrwatson <rwatson@FreeBSD.org>2009-06-25 14:44:00 +0000
commit51baf9c1b678c7b5092811c73262b321e6a9ac89 (patch)
treee616bcab63fb33aa36a4613946cfe746a5c17f4f /sys/netinet/ip_input.c
parentccfd747271541fc9d5eb3448dba9f53b9fef9de3 (diff)
downloadFreeBSD-src-51baf9c1b678c7b5092811c73262b321e6a9ac89.zip
FreeBSD-src-51baf9c1b678c7b5092811c73262b321e6a9ac89.tar.gz
Initialize in_ifaddr_lock using RW_SYSINIT() instead of in ip_init(),
so that it doesn't run multiple times if VIMAGE is being used. Discussed with: bz MFC after: 6 weeks
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 53c07fc..73ee286 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -117,7 +117,9 @@ static int maxfragsperpacket;
int ipstealth;
static int nipq; /* Total # of reass queues */
#endif
+
struct rwlock in_ifaddr_lock;
+RW_SYSINIT(in_ifaddr_lock, &in_ifaddr_lock, "in_ifaddr_lock");
SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, IPCTL_FORWARDING,
forwarding, CTLFLAG_RW, ipforwarding, 0,
@@ -326,7 +328,6 @@ ip_init(void)
TAILQ_INIT(&V_in_ifaddrhead);
V_in_ifaddrhashtbl = hashinit(INADDR_NHASH, M_IFADDR, &V_in_ifaddrhmask);
- IN_IFADDR_LOCK_INIT();
/* Initialize IP reassembly queue. */
for (i = 0; i < IPREASS_NHASH; i++)
OpenPOWER on IntegriCloud