PPP, SERVER, CHAP: fixed wrong pointer used on chap_timeout()

This commit is contained in:
Sylvain Rochet 2015-02-28 15:36:35 +01:00
parent 301511a840
commit 65493b421a

View File

@ -156,7 +156,6 @@ static void chap_lowerdown(ppp_pcb *pcb) {
* otherwise we wait for the lower layer to come up. * otherwise we wait for the lower layer to come up.
*/ */
void chap_auth_peer(ppp_pcb *pcb, const char *our_name, int digest_code) { void chap_auth_peer(ppp_pcb *pcb, const char *our_name, int digest_code) {
struct chap_server_state *ss = &pcb->chap_server;
const struct chap_digest_type *dp; const struct chap_digest_type *dp;
int i; int i;
@ -177,7 +176,7 @@ void chap_auth_peer(ppp_pcb *pcb, const char *our_name, int digest_code) {
pcb->chap_server.id = (unsigned char)(drand48() * 256); pcb->chap_server.id = (unsigned char)(drand48() * 256);
pcb->chap_server.flags |= AUTH_STARTED; pcb->chap_server.flags |= AUTH_STARTED;
if (pcb->chap_server.flags & LOWERUP) if (pcb->chap_server.flags & LOWERUP)
chap_timeout(ss); chap_timeout(pcb);
} }
#endif /* PPP_SERVER */ #endif /* PPP_SERVER */