summaryrefslogtreecommitdiffstats
path: root/sys/net/pfil.c
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2005-05-23 17:07:16 +0000
committermlaier <mlaier@FreeBSD.org>2005-05-23 17:07:16 +0000
commit54751b46c5804e934a208492d234844e88967c08 (patch)
treec970ac63cf8da917df79b53b000fcf8c3b55f635 /sys/net/pfil.c
parentc13418a2a73568000d642e2e12d4d7dd99b5f739 (diff)
downloadFreeBSD-src-54751b46c5804e934a208492d234844e88967c08.zip
FreeBSD-src-54751b46c5804e934a208492d234844e88967c08.tar.gz
Fix semantics of ph_busy_count == -1 to pass instead of block.
PR: kern/81128 Submitted by: Joost Bekkers MFC-after: 2 weeks
Diffstat (limited to 'sys/net/pfil.c')
-rw-r--r--sys/net/pfil.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pfil.c b/sys/net/pfil.c
index c9b7ce7..35ac338 100644
--- a/sys/net/pfil.c
+++ b/sys/net/pfil.c
@@ -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);
OpenPOWER on IntegriCloud