mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
PPP, PAP: cancel PAP timeout when authentication succeed or fail
upap_timeout is not currently stopped on authentication success or fail events. This may have strange results if session is restarted in a high pace because even if the timeout callback have a sanity check against the PAP state the session can be restarted and be back in the valid state before the timeout callback is actually called.
This commit is contained in:
parent
3013e1fc19
commit
9a9d92a59e
@ -481,6 +481,7 @@ static void upap_rauthack(ppp_pcb *pcb, u_char *inp, int id, int len) {
|
||||
}
|
||||
}
|
||||
|
||||
UNTIMEOUT(upap_timeout, pcb);
|
||||
pcb->upap.us_clientstate = UPAPCS_OPEN;
|
||||
|
||||
auth_withpeer_success(pcb, PPP_PAP, 0);
|
||||
@ -516,6 +517,7 @@ static void upap_rauthnak(ppp_pcb *pcb, u_char *inp, int id, int len) {
|
||||
}
|
||||
}
|
||||
|
||||
UNTIMEOUT(upap_timeout, pcb);
|
||||
pcb->upap.us_clientstate = UPAPCS_BADAUTH;
|
||||
|
||||
ppp_error(("PAP authentication failed"));
|
||||
|
Loading…
Reference in New Issue
Block a user