From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31935 invoked by alias); 11 May 2007 10:11:46 -0000 Received: (qmail 31926 invoked by uid 22791); 11 May 2007 10:11:45 -0000 X-Spam-Check-By: sourceware.org Received: from gbmddmh212asvr.siemens.co.uk (HELO GBMDDMH212ASVR.siemens.co.uk) (212.58.233.141) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 11 May 2007 10:11:44 +0000 Received: from GBMDDMH214ASVR (GBMDDMH214ASVR [192.168.200.78] (may be forged)) by GBMDDMH212ASVR.siemens.co.uk (Switch-3.1.5/Switch-3.1.2) with ESMTP id Z4BA0F4JU000048A8 for ; Fri, 11 May 2007 11:15:04 +0100 Received: from GBPLESL203AMSX.gb001.siemens.net ([137.223.88.6]unverified) by GBMDDMH214ASVR with InterScan Messaging Security Suite; Fri, 11 May 2007 11:09:15 +0100 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 11 May 2007 14:29:00 -0000 Message-ID: From: "Retallack, Mark" To: "ecos-discuss@ecos.sourceware.org" <'ecos-discuss@ecos.sourceware.org'> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] PPP patch for LCP issue X-SW-Source: 2007-05/txt/msg00063.txt.bz2 Good morning all,=20 This is just a quick email, I have just been going through our internal cvs repositry and found that the main eCos repositry (ecos.sourceware.org) has not been updated yet with a patch to fix repeated PPP LCP echo requests. The original patch was made by John Paul King (http://ecos.sourceware.org/ml/ecos-patches/2004-06/msg00025.html) and adds the following change to the lcp.c file: Index: packages/net/ppp/current/src/lcp.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/ecos/ecos-opt/net/net/ppp/current/src/lcp.c,v retrieving revision 1.2 diff -u -r1.2 lcp.c --- packages/net/ppp/current/src/lcp.c 17 Apr 2004 03:13:06 -0000 1.2 +++ packages/net/ppp/current/src/lcp.c 18 Jun 2004 21:08:15 -0000 @@ -1794,9 +1794,11 @@ /* * Start the timer for the next interval. */ - assert (lcp_echo_timer_running=3D=3D0); - TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval); - lcp_echo_timer_running =3D 1; + if (f->state =3D=3D OPENED) { + assert (lcp_echo_timer_running=3D=3D0); + TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval); + lcp_echo_timer_running =3D 1; + } } The result without this patch is the ppp stack sends 4 LCP requests with no time delay between each one and then brings down the network stack: Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): sent [LCP EchoReq id=3D0x1 magic=3D0x1b8402ed] Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): sent [LCP EchoReq id=3D0x2 magic=3D0x1b8402ed] Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): sent [LCP EchoReq id=3D0x3 magic=3D0x1b8402ed] Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): sent [LCP EchoReq id=3D0x4 magic=3D0x1b8402ed] Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): No response to 4 echo-requests Wed Feb 04 01:06:14 1970 N(IpPPPNetwork): Serial link appears to be disconnected. Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): sent [LCP TermReq id=3D0x2 "Peer not responding"] Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): rcvd [LCP EchoRep id=3D0x1 magic=3D0x6e4921f2] Mark Retallack Embedded Firmware Engineer Siemens Traffic Controls Sopers Lane, Poole, Dorset. BH17 7ER. UK. Tel: +44 (0) 1202 782189 Fax: +44 (0) 1202 782545 email: mark.retallack@siemens.com MSN: mark@retallack.org.uk Skipe: Mark Retallack www.siemenstraffic.com Committed to quality traffic solutions and service excellence -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss