mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
Fixed bug #13315 (PPP PAP authentication can result in erroneous callbacks) by copying the code from recent pppd
This commit is contained in:
parent
9a2d97ec41
commit
68ddcc6ca7
@ -41,6 +41,10 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2010-01-11: Simon Goldschmidt
|
||||
* pap.c: Fixed bug #13315 (PPP PAP authentication can result in
|
||||
erroneous callbacks) by copying the code from recent pppd
|
||||
|
||||
2010-01-10: Simon Goldschmidt
|
||||
* raw.c: Fixed bug #28506 (raw_bind should filter received packets)
|
||||
|
||||
|
@ -452,18 +452,19 @@ upap_rauthack(upap_state *u, u_char *inp, int id, int len)
|
||||
* Parse message.
|
||||
*/
|
||||
if (len < sizeof (u_char)) {
|
||||
UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet.\n"));
|
||||
return;
|
||||
UPAPDEBUG((LOG_INFO, "pap_rauthack: ignoring missing msg-length.\n"));
|
||||
} else {
|
||||
GETCHAR(msglen, inp);
|
||||
if (msglen > 0) {
|
||||
len -= sizeof (u_char);
|
||||
if (len < msglen) {
|
||||
UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet.\n"));
|
||||
return;
|
||||
}
|
||||
msg = (char *) inp;
|
||||
PRINTMSG(msg, msglen);
|
||||
}
|
||||
}
|
||||
GETCHAR(msglen, inp);
|
||||
len -= sizeof (u_char);
|
||||
if (len < msglen) {
|
||||
UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet.\n"));
|
||||
return;
|
||||
}
|
||||
msg = (char *) inp;
|
||||
PRINTMSG(msg, msglen);
|
||||
|
||||
UNTIMEOUT(upap_timeout, u); /* Cancel timeout */
|
||||
u->us_clientstate = UPAPCS_OPEN;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user