summaryrefslogtreecommitdiff
path: root/sys/net/if_pfsync.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2015-11-10 06:36:15 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2015-11-10 06:36:15 +0000
commit670573c4620acd7a3c69e2f90038c1f75cd7e002 (patch)
tree8f5bd78733ef4944ad4b6fba70102edf2308e579 /sys/net/if_pfsync.c
parent82e0d994af1be41aa7ef261ce4de3e253f387c9d (diff)
flush the send queue in start routines with IFQ_PURGE.
ok mpi@ uebayasi@
Diffstat (limited to 'sys/net/if_pfsync.c')
-rw-r--r--sys/net/if_pfsync.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 779038ed07a..2b7fab26bd6 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pfsync.c,v 1.221 2015/10/30 11:33:55 mikeb Exp $ */
+/* $OpenBSD: if_pfsync.c,v 1.222 2015/11/10 06:36:14 dlg Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff
@@ -253,8 +253,6 @@ int pfsyncioctl(struct ifnet *, u_long, caddr_t);
void pfsyncstart(struct ifnet *);
void pfsync_syncdev_state(void *);
-struct mbuf *pfsync_if_dequeue(struct ifnet *);
-
void pfsync_deferred(struct pf_state *, int);
void pfsync_undefer(struct pfsync_deferral *, int);
void pfsync_defer_tmo(void *);
@@ -390,31 +388,13 @@ pfsync_clone_destroy(struct ifnet *ifp)
return (0);
}
-struct mbuf *
-pfsync_if_dequeue(struct ifnet *ifp)
-{
- struct mbuf *m;
-
- IF_DEQUEUE(&ifp->if_snd, m);
-
- return (m);
-}
-
/*
* Start output on the pfsync interface.
*/
void
pfsyncstart(struct ifnet *ifp)
{
- struct mbuf *m;
- int s;
-
- s = splnet();
- while ((m = pfsync_if_dequeue(ifp)) != NULL) {
- IF_DROP(&ifp->if_snd);
- m_freem(m);
- }
- splx(s);
+ IFQ_PURGE(&ifp->if_snd);
}
void