From owner-freebsd-bugs Fri Dec 15 07:37:56 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA27951 for bugs-outgoing; Fri, 15 Dec 1995 07:37:56 -0800 (PST) Received: from ucvg.med.utah.edu (ucvg.med.utah.edu [128.110.62.18]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA27945 for ; Fri, 15 Dec 1995 07:37:50 -0800 (PST) Received: (from rick@localhost) by ucvg.med.utah.edu (8.6.11/8.6.11) id IAA03599; Fri, 15 Dec 1995 08:40:25 -0700 Resent-Date: Thu, 14 Dec 1995 10:40:05 -0800 (PST) Resent-Message-Id: <199512141840.KAA25835@freefall.freebsd.org> Resent-From: gnats@freefall.freebsd.org (GNATS Management) Resent-To: freebsd-bugs@freefall.freebsd.org Resent-Reply-To: FreeBSD-gnats@freefall.freebsd.org, jc@irbs.com Message-Id: <199512141833.NAA09618@irbs.irbs.com> Date: Thu, 14 Dec 1995 13:33:54 -0500 From: John Capo Reply-To: jc@irbs.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/892: ppp recursion problem and partial FIX ReSent-Date: Fri, 15 Dec 1995 08:40:14 -0700 (MST) ReSent-From: Rick Scheese ReSent-To: rick@rscheese.med.utah.edu ReSent-Message-ID: Sender: owner-bugs@FreeBSD.ORG Precedence: bulk >Number: 892 >Category: bin >Synopsis: ppp recursion problem and partial FIX >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 14 10:40:02 PST 1995 >Last-Modified: >Originator: John Capo >Organization: IRBS Engineering >Release: FreeBSD 2.1-STABLE i386 >Environment: >Description: There are two bugs here. One is that SendLqrReport() is called via StopLqr() when the line drops. I believe the intention was to stop the LQR timer. SendLqrReport() attempts to send an echo request or calls LcpClose() if > 5 echo packets have been lost. LcpClose() will wind up calling SendLqrReport() which is the second bug. Actually there is a third bug. I don't think that -auto mode should exit when echo packets are lost. The link should be re-started just as it is when LQR is off. #0 0xa2da in SendLqrReport () at lqr.c:121 #1 0xa5e5 in StopLqr (method=1) at lqr.c:227 #2 0x97d1 in LcpLayerDown (fp=0x17088) at lcp.c:375 #3 0x6046 in FsmClose (fp=0x17088) at fsm.c:185 #4 0x985d in LcpClose () at lcp.c:405 #5 0xa2da in SendLqrReport () at lqr.c:121 #6 0xa5e5 in StopLqr (method=1) at lqr.c:227 #7 0x97d1 in LcpLayerDown (fp=0x17088) at lcp.c:375 #8 0x6046 in FsmClose (fp=0x17088) at fsm.c:185 #9 0x985d in LcpClose () at lcp.c:405 #10 0xa2da in SendLqrReport () at lqr.c:121 #11 0xa5e5 in StopLqr (method=1) at lqr.c:227 #12 0x97d1 in LcpLayerDown (fp=0x17088) at lcp.c:375 #13 0x5fb6 in FsmDown (fp=0x17088) at fsm.c:164 #14 0x9829 in LcpDown () at lcp.c:391 #15 0xcfe3 in DownConnection () at modem.c:212 >How-To-Repeat: Disable and deny LQR Run ppp in -auto mode Cause 6 connections to drop by disconnecting the phone line. >Fix: This patch stops the LQR timer when the line drops rather than calling StopLqr(). The line is dead, no need to attempt to send echo requests. I have been using this code for 4 weeks. I'm not sure of the best way to fix the recursion problem when LQR is enabled and the lost packet threshold is hit. Setting lqmmethod to 0 before calling LcpClose() from SendLqrReport() is one way. *** lqr.c.orig Thu Dec 14 11:05:23 1995 --- lqr.c Thu Dec 14 11:05:39 1995 *************** *** 213,218 **** --- 213,224 ---- } void + StopLqrTimer(void) + { + StopTimer(&LqrTimer); + } + + void StopLqr(method) int method; { *** lcp.c.orig Thu Dec 14 11:04:16 1995 --- lcp.c Thu Dec 14 11:04:46 1995 *************** *** 327,332 **** --- 327,333 ---- StopIdleTimer(); StopTimer(&AuthPapInfo.authtimer); StopTimer(&AuthChapInfo.authtimer); + StopLqrTimer(); } static void *************** *** 372,378 **** { LogPrintf(LOG_LCP, "%s: LayerDown\n", fp->name); StopAllTimers(); - StopLqr( LQM_LQR ); OsLinkdown(); NewPhase(PHASE_TERMINATE); } --- 373,378 ---- >Audit-Trail: >Unformatted: