[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #6969] PPP: missing PAP authentication UNTIMEOUT
From: |
Iordan Neshev |
Subject: |
[lwip-devel] [patch #6969] PPP: missing PAP authentication UNTIMEOUT |
Date: |
Fri, 06 Nov 2009 10:17:41 +0000 |
User-agent: |
Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.00 |
URL:
<http://savannah.nongnu.org/patch/?6969>
Summary: PPP: missing PAP authentication UNTIMEOUT
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: iordan_neshev
Submitted on: Fri 06 Nov 2009 10:17:40 AM GMT
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
static void
upap_rauthack(upap_state *u, u_char *inp, int id, int len)
{
u_char msglen;
char *msg;
LWIP_UNUSED_ARG(id);
UPAPDEBUG((LOG_INFO, "pap_rauthack: Rcvd id %d s=%d\n", id,
u->us_clientstate));
if (u->us_clientstate != UPAPCS_AUTHREQ) { /* XXX */
UPAPDEBUG((LOG_INFO, "pap_rauthack: us_clientstate != UPAPCS_AUTHREQ;
returning\n"));
return;
}
/*
* Parse message.
*/
if (len < (int)sizeof (u_char)) {
UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet.\n"));
return;
}
GETCHAR(msglen, inp);
len -= sizeof (u_char);
if (len < msglen) {
UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet.\n"));
return;
}
// THIS IS MISSING --->
#if 1
UNTIMEOUT(upap_timeout, u); /* Cancel timeout */
#endif
// <----
msg = (char *) inp;
PRINTMSG(msg, msglen);
u->us_clientstate = UPAPCS_OPEN;
auth_withpeer_success(u->us_unit, PPP_PAP); // follows NETWORK phase
}
When the LCP layer is up, lwip sends PAP authenticate request using
upap_sauthreq(). It sends the packet and sets a TIMEOUT(upap_timeout) which is
supposed to resend the request if we do not receive ACK in a reasonable time.
upap_rauthack() is called when the peer acknowledges our PAP authenticate
request. It starts the network phase of the PPP phase diagram. Before that the
PAP timeout should be canceled (but it's not). As a result I see it a little
bit after the PPP session is completely ready.
It's harmless, because this if() prevents sending
another auth request.
if (u->us_clientstate != UPAPCS_AUTHREQ) {
return;
}
Anyway, I think it should be avoided. This bug is missing in
ChapReceiveSuccess() (this does the same as upap_rauthack when tha auth
protocol is CHAP).
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?6969>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [patch #6969] PPP: missing PAP authentication UNTIMEOUT,
Iordan Neshev <=