mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Fix semantics of ph_busy_count == -1 to pass instead of block.
PR: kern/81128 Submitted by: Joost Bekkers MFC-after: 2 weeks
This commit is contained in:
parent
61a20ce696
commit
d274e6b641
1 changed files with 3 additions and 1 deletions
|
|
@ -119,12 +119,14 @@ pfil_run_hooks(struct pfil_head *ph, struct mbuf **mp, struct ifnet *ifp,
|
|||
struct mbuf *m = *mp;
|
||||
int rv = 0;
|
||||
|
||||
if (ph->ph_busy_count == -1)
|
||||
return (0);
|
||||
/*
|
||||
* Prevent packet filtering from starving the modification of
|
||||
* the packet filters. We would prefer a reader/writer locking
|
||||
* mechanism with guaranteed ordering, though.
|
||||
*/
|
||||
if (ph->ph_busy_count == -1 || ph->ph_want_write) {
|
||||
if (ph->ph_want_write) {
|
||||
m_freem(*mp);
|
||||
*mp = NULL;
|
||||
return (ENOBUFS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue