summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2015-03-29 01:05:03 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2015-03-29 01:05:03 +0000
commit266c25a8717dc83a3cce48a03a22cb6620dde9e9 (patch)
tree4ad05094889bd23c26739c2c3bc0aaca77283181 /sys
parentb4f98a72523de675fc1cf66b41fe61cb0b4a0b26 (diff)
if_detached start dequeues mbufs on the start list and immediately
frees them. IFQ_PURGE does that too, so let's reuse it here.
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 8028522cc55..b24758a5b14 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.323 2015/03/25 11:49:02 dlg Exp $ */
+/* $OpenBSD: if.c,v 1.324 2015/03/29 01:05:02 dlg Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -1742,15 +1742,7 @@ ifconf(u_long cmd, caddr_t data)
void
if_detached_start(struct ifnet *ifp)
{
- struct mbuf *m;
-
- while (1) {
- IF_DEQUEUE(&ifp->if_snd, m);
-
- if (m == NULL)
- return;
- m_freem(m);
- }
+ IFQ_PURGE(&ifp->if_snd);
}
int