pf: Take the IF_ADDR_RLOCK() when iterating over the group list
We did do this elsewhere in pf, but the lock was missing here. Sponsored by: Essen Hackathon
This commit is contained in:
parent
33b242b533
commit
e9ddca4a40
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=337644
@ -297,11 +297,16 @@ pfi_kif_match(struct pfi_kif *rule_kif, struct pfi_kif *packet_kif)
|
||||
if (rule_kif == NULL || rule_kif == packet_kif)
|
||||
return (1);
|
||||
|
||||
if (rule_kif->pfik_group != NULL)
|
||||
/* XXXGL: locking? */
|
||||
if (rule_kif->pfik_group != NULL) {
|
||||
IF_ADDR_RLOCK(packet_kif->pfik_ifp);
|
||||
CK_STAILQ_FOREACH(p, &packet_kif->pfik_ifp->if_groups, ifgl_next)
|
||||
if (p->ifgl_group == rule_kif->pfik_group)
|
||||
if (p->ifgl_group == rule_kif->pfik_group) {
|
||||
IF_ADDR_RUNLOCK(packet_kif->pfik_ifp);
|
||||
return (1);
|
||||
}
|
||||
IF_ADDR_RUNLOCK(packet_kif->pfik_ifp);
|
||||
}
|
||||
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user