summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorAlexandr Nedvedicky <sashan@cvs.openbsd.org>2019-06-04 23:00:44 +0000
committerAlexandr Nedvedicky <sashan@cvs.openbsd.org>2019-06-04 23:00:44 +0000
commitb85e6844484158c34229b28256507940d2579c8c (patch)
tree73e60c79fc1847be3968e90b5c68c2a845e0b802 /sys/net
parent06e84e0368e9d9806fdf5c9741f0e8f8fdfd1c59 (diff)
pfsync_sendout() requires PF_LOCK()
OK mpi@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_pfsync.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 20a0136e838..25ef5243824 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.262 2019/02/10 16:42:35 phessler Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.263 2019/06/04 23:00:43 sashan Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -1581,6 +1581,8 @@ pfsync_sendout(void)
int offset;
int q, count = 0;
+ PF_ASSERT_LOCKED();
+
if (sc == NULL || sc->sc_len == PFSYNC_MINPKT)
return;
@@ -2472,7 +2474,9 @@ void
pfsync_timeout(void *arg)
{
NET_LOCK();
+ PF_LOCK();
pfsync_sendout();
+ PF_UNLOCK();
NET_UNLOCK();
}
@@ -2480,7 +2484,9 @@ pfsync_timeout(void *arg)
void
pfsyncintr(void)
{
+ PF_LOCK();
pfsync_sendout();
+ PF_UNLOCK();
}
int