[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #29855] PPP: Backport a bugfix in LcpSendEchoRequest f

From: Iordan Neshev
Subject: [lwip-devel] [bug #29855] PPP: Backport a bugfix in LcpSendEchoRequest from pppd
Date: Tue, 11 May 2010 13:23:03 +0000
User-agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.00


                 Summary: PPP: Backport a bugfix in LcpSendEchoRequest from
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: iordan_neshev
            Submitted on: Tue 11 May 2010 01:23:02 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head



file: ppp/lpc.c
func: LcpSendEchoRequest (fsm *f)

The number of the pending echos we are waiting is currently (lwip code)
incremented before an echo request is actually sent.
In the latest pppd the corresponding variable lcp_echos_pending
is incremeted after the request is really sent, so LcpSendEchoRequest()
should look like this:

static void
LcpSendEchoRequest (fsm *f)
  u32_t lcp_magic;
  u_char pkt[4], *pktp;

   * Detect the failure of the peer at this point.
  if (lcp_echo_fails != 0) {
    if (lcp_echos_pending >= lcp_echo_fails) {
      lcp_echos_pending = 0;

   * Make and send the echo request frame.
  if (f->state == LS_OPENED) {
    lcp_magic = lcp_gotoptions[f->unit].magicnumber;
    pktp = pkt;
    PUTLONG(lcp_magic, pktp);
    fsm_sdata(f, ECHOREQ, (u_char)(lcp_echo_number++ & 0xFF), pkt, (int)(pktp
- pkt));

Thus bug has no harmful effects.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]