summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/net/if_pflog.c16
-rw-r--r--sys/net/if_pfsync.c24
2 files changed, 4 insertions, 36 deletions
diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c
index 111bdbc4707..27faf0b217a 100644
--- a/sys/net/if_pflog.c
+++ b/sys/net/if_pflog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflog.c,v 1.71 2015/08/25 12:06:47 jsg Exp $ */
+/* $OpenBSD: if_pflog.c,v 1.72 2015/11/10 06:36:14 dlg Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -198,19 +198,7 @@ pflog_clone_destroy(struct ifnet *ifp)
void
pflogstart(struct ifnet *ifp)
{
- struct mbuf *m;
- int s;
-
- for (;;) {
- s = splnet();
- IF_DROP(&ifp->if_snd);
- IF_DEQUEUE(&ifp->if_snd, m);
- splx(s);
-
- if (m == NULL)
- return;
- m_freem(m);
- }
+ IFQ_PURGE(&ifp->if_snd);
}
int
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