diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-07-05 21:11:37 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-07-05 21:11:37 +0000 |
commit | a28c827b6cef7886430e3426e9f4a2d202681eae (patch) | |
tree | 0573bc7193cb5114781e2d2da71228a48c984e4a /sys/net/if_spppsubr.c | |
parent | 2b642d576deacc43a68295b539e64c826438ea4b (diff) |
Revert henning's commit-n-run that broke the tree
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r-- | sys/net/if_spppsubr.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index ac290b715d4..57cb5c8c45c 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.89 2011/07/05 20:01:40 henning Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.90 2011/07/05 21:11:36 guenther Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -1012,7 +1012,7 @@ sppp_isempty(struct ifnet *ifp) int empty, s; s = splnet(); - empty = IFQ_IS_EMPTY(&sp->pp_fastq) && IFQ_IS_EMPTY(&sp->pp_cpq) && + empty = !sp->pp_fastq.ifq_head && !sp->pp_cpq.ifq_head && IFQ_IS_EMPTY(&sp->pp_if.if_snd); splx(s); return (empty); @@ -4535,7 +4535,16 @@ sppp_auth_send(const struct cp *cp, struct sppp *sp, HIDE void sppp_qflush(struct ifqueue *ifq) { - IFQ_PURGE(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; } /* |