mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
radix node head lock needs to be held when calling rnh_addaddr
This commit is contained in:
parent
979245af95
commit
fe6320b468
1 changed files with 2 additions and 0 deletions
|
|
@ -1826,7 +1826,9 @@ add_table_entry(struct ip_fw_chain *ch, uint16_t tbl, in_addr_t addr,
|
|||
ent->mask.sin_addr.s_addr = htonl(mlen ? ~((1 << (32 - mlen)) - 1) : 0);
|
||||
ent->addr.sin_addr.s_addr = addr & ent->mask.sin_addr.s_addr;
|
||||
IPFW_WLOCK(ch);
|
||||
RADIX_NODE_HEAD_LOCK(rnh);
|
||||
if (rnh->rnh_addaddr(&ent->addr, &ent->mask, rnh, (void *)ent) ==
|
||||
RADIX_NODE_HEAD_UNLOCK(rnh);
|
||||
NULL) {
|
||||
IPFW_WUNLOCK(ch);
|
||||
free(ent, M_IPFW_TBL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue