Home | History | Annotate | Download | only in net

Lines Matching defs:chap

144  * being one of "lcp", "ipcp", "cisco", "chap", "pap", etc.
195 #define CHAP_CHALLENGE 1 /* CHAP challenge request */
196 #define CHAP_RESPONSE 2 /* CHAP challenge response */
197 #define CHAP_SUCCESS 3 /* CHAP response ok */
198 #define CHAP_FAILURE 4 /* CHAP response failed */
547 static const struct cp chap = {
548 PPP_CHAP, IDX_CHAP, CP_AUTH, "chap",
561 &chap, /* IDX_CHAP */
1136 sppp_cp_fini(&chap, sp);
2659 addlog(" [invalid chap len]");
2804 addlog(" [chap without MD5]");
3265 char opt[6 /* magicnum */ + 4 /* mru */ + 5 /* chap */];
4567 * The CHAP implementation. *
4589 * Handle incoming CHAP packets.
4597 u_char *value, *name, digest[sizeof(sp->chap.challenge)];
4608 SPPP_DLOG(sp, "chap invalid packet length: "
4624 SPPP_DLOG(sp, "chap input "
4637 "chap corrupted challenge "
4652 "chap input <%s id=0x%x len=%d name=",
4665 MD5Final(sp->chap.digest, &ctx);
4666 sp->chap.digest_len = sizeof(sp->chap.digest);
4669 sppp_wq_add(sp->wq_cp, &sp->chap.work_challenge_rcvd);
4674 chap success");
4684 chap.name, h->ident,
4690 if (sp->chap.digest_len == 0) {
4691 SPPP_DLOG(sp, "receive CHAP success"
4701 memset(sp->chap.digest, 0, sizeof(sp->chap.digest));
4702 sp->chap.digest_len = 0;
4704 if (!ISSET(sppp_auth_role(&chap, sp), SPPP_AUTH_SERV)) {
4706 * we are not authenticator for CHAP,
4718 chap.name, h->ident, sp->scp[IDX_CHAP].rconfid);
4723 if (sp->chap.digest_len == 0) {
4724 SPPP_DLOG(sp, "receive CHAP failure "
4733 SPPP_LOG(sp, LOG_INFO, "chap failure");
4742 memset(sp->chap.digest, 0, sizeof(sp->chap.digest));
4743 sp->chap.digest_len = 0;
4754 SPPP_DLOG(sp, "chap response "
4767 "chap corrupted response "
4778 SPPP_DLOG(sp, "chap dropping response for old ID "
4790 "chap response, his name ");
4806 SPPP_LOG(sp, LOG_DEBUG, "chap input(%s) "
4816 if (value_len == sizeof(sp->chap.challenge) &&
4817 value_len == sizeof(sp->chap.digest)) {
4821 MD5Update(&ctx, sp->chap.challenge, sizeof(sp->chap.challenge));
4832 "chap bad hash value length: "
4834 value_len, sizeof(sp->chap.challenge));
4844 (!ISSET(sppp_auth_role(&chap, sp), SPPP_AUTH_PEER) ||
4845 sp->chap.rechallenging)) {
4851 /* Unknown CHAP packet type -- ignore. */
4853 SPPP_LOG(sp, LOG_DEBUG, "chap unknown input(%s) "
4874 sppp_cp_init(&chap, sp);
4876 SPPP_WQ_SET(&sp->chap.work_challenge_rcvd,
4877 sppp_chap_rcv_challenge_event, &chap);
4886 memset(sp->chap.digest, 0, sizeof(sp->chap.digest));
4887 sp->chap.digest_len = 0;
4888 sp->chap.rechallenging = false;
4889 sp->chap.response_rcvd = false;
4906 SPPP_LOG(sp, LOG_DEBUG, "chap %s",
4910 * Some broken CHAP implementations (Conware CoNet, firmware
4911 * 4.0.?) don't want to re-authenticate their CHAP once the
4915 if (ISSET(sppp_auth_role(&chap, sp), SPPP_AUTH_SERV) &&
4948 role = sppp_auth_role(&chap, sp);
4951 !sp->chap.response_rcvd) {
4952 /* we are authenticator for CHAP, send challenge */
4953 ch = (uint32_t *)sp->chap.challenge;
4954 clen = sizeof(sp->chap.challenge);
4959 sppp_auth_send(&chap, sp, CHAP_CHALLENGE, sp->scp[IDX_CHAP].confid,
4961 sizeof(sp->chap.challenge), sp->chap.challenge,
4966 sp->chap.digest_len > 0) {
4967 /* we are peer for CHAP, send response */
4968 dsize = sp->chap.digest_len;
4970 sppp_auth_send(&chap, sp, CHAP_RESPONSE, sp->scp[IDX_CHAP].rconfid,
4972 sp->chap.digest_len, sp->chap.digest,
4984 sp->chap.rechallenging = false;
5251 * Send a PAP or CHAP proto packet.
5391 sp->chap.rechallenging = true;
5392 sp->chap.response_rcvd = false;
6285 default: name = "chap"; break;
6404 case PPP_CHAP: return "chap";