buglwIP - A Lightweight TCP/IP stack - Bugs: bug #29855, PPP: Backport a bugfix in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29855: PPP: Backport a bugfix in LcpSendEchoRequest from pppd

Submitted by:  Iordan Neshev <iordan_neshev>
Submitted on:  Tue 11 May 2010 01:23:02 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Tue 11 May 2010 04:55:07 PM UTC, comment #1:

Done. I've compared it to pppd because I wondered why that changed - before that change, lcp_echos_pending was 0 after sending but now it is 1. Anyway, since the pppd guys changed it to that, I think we're better off changing it, too ;-)

Thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 11 May 2010 01:23:02 PM UTC, original submission:

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.

Iordan Neshev <iordan_neshev>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by iordan_neshev (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 11 May 2010 04:55:07 PM UTCgoldsimonItem GroupNone=>Faulty Behaviour
      StatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1