From 6f8e9f0a8a6fa4e9dd0ad9ada1caecef634c90a2 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Tue, 25 Aug 1998 17:48:43 +0000 Subject: If we've got a full output buffer queue and cannot send anything for two mintues (see ``set choked'' and ``show bundle''), nuke the ip, mp and link level buffer queues. This should fix problems where ``ppp -auto'' seems to stop responding after failing to connect to the peer a few times. --- usr.sbin/ppp/ip.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'usr.sbin/ppp/ip.c') diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c index 9d80c24b6736..e5f1d53f64c6 100644 --- a/usr.sbin/ppp/ip.c +++ b/usr.sbin/ppp/ip.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ip.c,v 1.49 1998/07/11 19:05:24 brian Exp $ + * $Id: ip.c,v 1.50 1998/08/07 18:42:48 brian Exp $ * * TODO: * o Return ICMP message for filterd packet @@ -505,6 +505,16 @@ ip_Enqueue(int pri, char *ptr, int count) mbuf_Enqueue(&IpOutputQueues[pri], bp); } +void +ip_DeleteQueue() +{ + struct mqueue *queue; + + for (queue = IpOutputQueues; queue < IpOutputQueues + PRI_MAX; queue++) + while (queue->top) + mbuf_Free(mbuf_Dequeue(queue)); +} + int ip_QueueLen() { -- cgit v1.3