lwip-devel
[Top][All Lists]
Advanced

[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

URL:
  <http://savannah.nongnu.org/bugs/?29855>

                 Summary: PPP: Backport a bugfix in LcpSendEchoRequest from
pppd
                 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

    _______________________________________________________

Details:

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) {
      LcpLinkFailure(f);
      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));
    ++lcp_echos_pending;
  }
}

Thus bug has no harmful effects.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?29855>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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