ppp_pap_process_packet(ppp->pap, packet, len - offset);
else
pppcp_send_protocol_reject(ppp->lcp, buf, len);
+
break;
case CHAP_PROTOCOL:
if (ppp->chap) {
else
/* It'll never work out. */
ppp_auth_notify(ppp, FALSE);
+
return;
}
guint16 length;
length = sizeof(*authreq) + strlen(username) + strlen(password) + 2;
+
packet = ppp_packet_new(length, PAP_PROTOCOL);
if (packet == NULL)
return FALSE;
+
pap->authreq = packet;
pap->authreq_len = length;
ppp_transmit(pap->ppp, (guint8 *)packet, length);
pap->retries = 0;
pap->retry_timer = g_timeout_add_seconds(PAP_TIMEOUT,
- ppp_pap_timeout, pap);
+ ppp_pap_timeout, pap);
return TRUE;
}
{
if (pap->retry_timer != 0)
g_source_remove(pap->retry_timer);
+
if (pap->authreq != NULL)
g_free(pap->authreq);
+
g_free(pap);
}