This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PPP patch for LCP issue


Good morning all, 

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
===================================================================
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==0);
-    TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval);
-    lcp_echo_timer_running = 1;
+    if (f->state == OPENED) {
+        assert (lcp_echo_timer_running==0);
+        TIMEOUT (LcpEchoTimeout, f, lcp_echo_interval);
+        lcp_echo_timer_running = 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=0x1
magic=0x1b8402ed]
Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): sent [LCP EchoReq id=0x2
magic=0x1b8402ed]
Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): sent [LCP EchoReq id=0x3
magic=0x1b8402ed]
Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): sent [LCP EchoReq id=0x4
magic=0x1b8402ed]
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=0x2 "Peer
not responding"]
Wed Feb 04 01:06:14 1970 I(IpPPPNetwork): rcvd [LCP EchoRep id=0x1
magic=0x6e4921f2]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]