summaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c15
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;
}
/*