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
This commit is contained in:
parent
a708803975
commit
64aeca7b42
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194962
@ -116,7 +116,6 @@ extern u_long in_ifaddrhmask; /* mask for hash table */
|
||||
|
||||
extern struct rwlock in_ifaddr_lock;
|
||||
|
||||
#define IN_IFADDR_LOCK_INIT() rw_init(&in_ifaddr_lock, "in_ifaddr_lock")
|
||||
#define IN_IFADDR_LOCK_ASSERT() rw_assert(&in_ifaddr_lock, RA_LOCKED)
|
||||
#define IN_IFADDR_RLOCK() rw_rlock(&in_ifaddr_lock)
|
||||
#define IN_IFADDR_RLOCK_ASSERT() rw_assert(&in_ifaddr_lock, RA_RLOCKED)
|
||||
|
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user