Subject: bin/839: pppd: bogus LCP echo failure
To: None <gnats-admin@NetBSD.ORG>
From: Simon J. Gerraty <sjg@zen.void.oz.au>
List: netbsd-bugs
Date: 03/02/1995 12:05:08
>Number:         839
>Category:       bin
>Synopsis:       pppd shutsdown despite receiving LCP echo replies
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar  2 12:05:03 1995
>Originator:     Simon J. Gerraty
>Organization:
Zen Programming...
>Release:        1.0
>Environment:
	
System: NetBSD zen.void.oz.au 1.0 NetBSD 1.0 (ZEN) #6: Tue Dec 13 09:55:20 EST 1994 root@zen.void.oz.au:/usr/src/sys/arch/i386/compile/ZEN i386


>Description:
	
Ok, ppp session to a Sun (Sparcstation 10 running SunOS 4.1.3 and
pppd-2.1.2b)  all humming happily.  At one point I pinged it for 338
packes with only 2% loss.  Yet invariably NetBSD end shutsdown due to
excessive LCP echo failures - while log clearly shows them being
send/received ok.  I can only guess that this is an endian problem.

Note both ends are doing LCP but at different frequency.

Log extract:
...
Mar  2 22:09:46 zen pppd[15809]: rcvd [LCP EchoReq id=0x7 5d 60 a9 0e]
Mar  2 22:09:46 zen pppd[15809]: sent [LCP EchoRep id=0x7 2f 52 b1 06 bc a4]
Mar  2 22:12:46 zen pppd[15809]: rcvd [LCP EchoReq id=0x8 5d 60 a9 0e]
Mar  2 22:12:46 zen pppd[15809]: sent [LCP EchoRep id=0x8 2f 52 b1 06 bc a4]
Mar  2 22:13:47 zen pppd[15809]: sent [LCP EchoReq id=0x5 2f 52 b1 06]
Mar  2 22:13:47 zen pppd[15809]: rcvd [LCP EchoRep id=0x5 5d 60 a9 0e]
Mar  2 22:15:46 zen pppd[15809]: rcvd [LCP EchoReq id=0x9 5d 60 a9 0e]
Mar  2 22:15:46 zen pppd[15809]: sent [LCP EchoRep id=0x9 2f 52 b1 06 bc a4]
Mar  2 22:18:47 zen pppd[15809]: rcvd [LCP EchoReq id=0xa 5d 60 a9 0e]
Mar  2 22:18:47 zen pppd[15809]: sent [LCP EchoRep id=0xa 2f 52 b1 06 bc a4]
Mar  2 22:18:47 zen pppd[15809]: Excessive lack of response to LCP echo frames.
Mar  2 22:18:47 zen pppd[15809]: sent [LCP TermReq id=0x2]
Mar  2 22:18:47 zen pppd[15809]: rcvd [LCP TermAck id=0x2]
Mar  2 22:18:47 zen pppd[15809]: Connection terminated.
Mar  2 22:18:47 zen pppd[15809]: Exit.

I've not spent enough time looking at the source yet, but lpc.c
indicates that a magic number must be correct before it resets the
count of pending requests.  My _guess_ is that that check is failing.

I checked the Feb26-current pppd sources against 1.0 and did not spot
any significant changes in this regard.

>How-To-Repeat:
	<code/input/activities to reproduce the problem (multiple
lines)>
	Try LCP echo.
>Fix:
	
>Audit-Trail:
>Unformatted: