mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-30 12:32:37 +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:
|
++ 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
|
2010-01-10: Simon Goldschmidt
|
||||||
* raw.c: Fixed bug #28506 (raw_bind should filter received packets)
|
* 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.
|
* Parse message.
|
||||||
*/
|
*/
|
||||||
if (len < sizeof (u_char)) {
|
if (len < sizeof (u_char)) {
|
||||||
UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet.\n"));
|
UPAPDEBUG((LOG_INFO, "pap_rauthack: ignoring missing msg-length.\n"));
|
||||||
return;
|
} 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 */
|
UNTIMEOUT(upap_timeout, u); /* Cancel timeout */
|
||||||
u->us_clientstate = UPAPCS_OPEN;
|
u->us_clientstate = UPAPCS_OPEN;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user