summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2011-07-06 02:54:31 +0000
committerhenning <henning@openbsd.org>2011-07-06 02:54:31 +0000
commit6d6743037b3a59153ff215b42c935dcbd0fb5493 (patch)
treec13abacf9cb7f76cd796ae533e3becdf764512b5
parentuse IF_IS_EMPTY istead of mucking if ifqueue internals (diff)
downloadwireguard-openbsd-6d6743037b3a59153ff215b42c935dcbd0fb5493.tar.xz
wireguard-openbsd-6d6743037b3a59153ff215b42c935dcbd0fb5493.zip
and make sppp_qflush a wrapper around IF_PURGE instead of handrolling
the same, ok'd with IFQ_PURGE with happens to break on altq kernels by claudio, ryan and bluhm
-rw-r--r--sys/net/if_spppsubr.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index db5ba1e2929..3c12312a1ca 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.92 2011/07/06 02:49:36 henning Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.93 2011/07/06 02:54:31 henning Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP modes.
@@ -4534,16 +4534,7 @@ sppp_auth_send(const struct cp *cp, struct sppp *sp,
HIDE void
sppp_qflush(struct ifqueue *ifq)
{
- struct mbuf *m, *n;
-
- n = ifq->ifq_head;
- while ((m = n)) {
- n = m->m_act;
- m_freem (m);
- }
- ifq->ifq_head = 0;
- ifq->ifq_tail = 0;
- ifq->ifq_len = 0;
+ IF_PURGE(ifq);
}
/*