Lines Matching full:mppe
41 #ifdef MPPE
68 #ifdef MPPE
111 #ifdef MPPE
112 /* MPPE options are symmetrical ... we only set wantoptions here */
113 { "require-mppe", o_bool, &ccp_wantoptions[0].mppe,
114 "require MPPE encryption",
116 { "+mppe", o_bool, &ccp_wantoptions[0].mppe,
117 "require MPPE encryption",
119 { "nomppe", o_bool, &ccp_wantoptions[0].mppe,
120 "don't allow MPPE encryption", OPT_PRIO },
121 { "-mppe", o_bool, &ccp_wantoptions[0].mppe,
122 "don't allow MPPE encryption", OPT_ALIAS | OPT_PRIO },
124 /* We use ccp_allowoptions[0].mppe as a junk var ... it is reset later */
125 { "require-mppe-40", o_bool, &ccp_allowoptions[0].mppe,
126 "require MPPE 40-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_40,
127 &ccp_wantoptions[0].mppe },
128 { "+mppe-40", o_bool, &ccp_allowoptions[0].mppe,
129 "require MPPE 40-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_40,
130 &ccp_wantoptions[0].mppe },
131 { "nomppe-40", o_bool, &ccp_allowoptions[0].mppe,
132 "don't allow MPPE 40-bit encryption",
133 OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_40, &ccp_wantoptions[0].mppe },
134 { "-mppe-40", o_bool, &ccp_allowoptions[0].mppe,
135 "don't allow MPPE 40-bit encryption",
137 &ccp_wantoptions[0].mppe },
139 { "require-mppe-128", o_bool, &ccp_allowoptions[0].mppe,
140 "require MPPE 128-bit encryption", OPT_PRIO | OPT_A2OR | MPPE_OPT_128,
141 &ccp_wantoptions[0].mppe },
142 { "+mppe-128", o_bool, &ccp_allowoptions[0].mppe,
143 "require MPPE 128-bit encryption",
145 &ccp_wantoptions[0].mppe },
146 { "nomppe-128", o_bool, &ccp_allowoptions[0].mppe,
147 "don't allow MPPE 128-bit encryption",
148 OPT_PRIOSUB | OPT_A2CLRB | MPPE_OPT_128, &ccp_wantoptions[0].mppe },
149 { "-mppe-128", o_bool, &ccp_allowoptions[0].mppe,
150 "don't allow MPPE 128-bit encryption",
152 &ccp_wantoptions[0].mppe },
155 { "mppe-stateful", o_bool, &refuse_mppe_stateful,
156 "allow MPPE stateful mode", OPT_PRIO },
158 "disallow MPPE stateful mode", OPT_PRIO | 1 },
159 #endif /* MPPE */
244 || (opt).mppe)
457 #ifdef MPPE
458 if (ccp_gotoptions[unit].mppe) {
459 error("MPPE disabled, closing LCP");
460 lcp_close(unit, "MPPE disabled by peer");
517 #ifdef MPPE
518 if (ccp_gotoptions[unit].mppe) {
519 error("MPPE required but peer negotiation failed");
520 lcp_close(unit, "MPPE required but peer negotiation failed");
539 #ifdef MPPE
540 if (go->mppe) {
551 * NB: If MPPE is required, all other compression opts are invalid.
566 error("MPPE required, but auth done in both directions.");
567 lcp_close(f->unit, "MPPE required but not available");
571 error("MPPE required, but MS-CHAP[v2] auth not performed.");
572 lcp_close(f->unit, "MPPE required but not available");
578 error("MPPE required, but keys are not available. "
580 lcp_close(f->unit, "MPPE required but not available");
584 /* LM auth not supported for MPPE */
587 if (go->mppe & MPPE_OPT_40) {
588 notice("Disabling 40-bit MPPE; MS-CHAP LM not supported");
589 go->mppe &= ~MPPE_OPT_40;
590 ccp_wantoptions[f->unit].mppe &= ~MPPE_OPT_40;
595 if (!(go->mppe & (MPPE_OPT_40 | MPPE_OPT_128))) {
597 error("MPPE required, but both 40-bit and 128-bit disabled.");
598 lcp_close(f->unit, "MPPE required but not available");
603 ao->mppe = go->mppe;
604 /* MPPE is not compatible with other compression types */
610 #endif /* MPPE */
616 #ifdef MPPE
617 if (go->mppe) {
620 MPPE_OPTS_TO_CI(go->mppe, &opt_buf[2]);
623 error("MPPE required, but kernel has no support.");
624 lcp_close(f->unit, "MPPE required but not available");
682 + (go->mppe? CILEN_MPPE: 0);
703 #ifdef MPPE
704 if (go->mppe) {
709 MPPE_OPTS_TO_CI(go->mppe, &p[2]);
710 MPPE_OPTS_TO_CI(go->mppe, &opt_buf[2]);
717 lcp_close(f->unit, "MPPE required but not available in kernel");
816 #ifdef MPPE
817 if (go->mppe) {
822 MPPE_OPTS_TO_CI(go->mppe, &opt_buf[2]);
910 #ifdef MPPE
911 if (go->mppe && len >= CILEN_MPPE
913 no.mppe = 1;
918 MPPE_CI_TO_OPTS(&p[2], try.mppe);
919 if ((try.mppe & MPPE_OPT_STATEFUL) && refuse_mppe_stateful) {
920 error("Refusing MPPE stateful mode offered by peer");
921 try.mppe = 0;
922 } else if (((go->mppe | MPPE_OPT_STATEFUL) & try.mppe) != try.mppe) {
924 try.mppe = 0;
927 if (!try.mppe) {
928 error("MPPE required but peer negotiation failed");
929 lcp_close(f->unit, "MPPE required but peer negotiation failed");
932 #endif /* MPPE */
1004 #ifdef MPPE
1005 if (go->mppe && len >= CILEN_MPPE
1007 error("MPPE required but peer refused");
1008 lcp_close(f->unit, "MPPE required but peer refused");
1080 #ifdef MPPE
1104 #ifdef MPPE
1106 if (!ao->mppe || clen != CILEN_MPPE) {
1110 MPPE_CI_TO_OPTS(&p[2], ho->mppe);
1113 if (ho->mppe & MPPE_OPT_UNSUPPORTED) {
1115 ho->mppe &= ~MPPE_OPT_UNSUPPORTED;
1117 if (ho->mppe & MPPE_OPT_UNKNOWN) {
1119 ho->mppe &= ~MPPE_OPT_UNKNOWN;
1123 if (ho->mppe & MPPE_OPT_STATEFUL) {
1128 * the Internet -- which is where we expect MPPE.
1131 error("Refusing MPPE stateful mode offered by peer");
1138 if ((ho->mppe & MPPE_OPT_128)
1139 && (ho->mppe & MPPE_OPT_40)) {
1142 if (ao->mppe & MPPE_OPT_128)
1143 ho->mppe &= ~MPPE_OPT_40;
1144 else if (ao->mppe & MPPE_OPT_40)
1145 ho->mppe &= ~MPPE_OPT_128;
1150 } else if (ho->mppe & MPPE_OPT_128) {
1151 if (!(ao->mppe & MPPE_OPT_128)) {
1155 } else if (ho->mppe & MPPE_OPT_40) {
1156 if (!(ao->mppe & MPPE_OPT_40)) {
1166 ho->mppe = ao->mppe;
1170 MPPE_OPTS_TO_CI(ho->mppe, &p[2]);
1181 error("MPPE required, but kernel has no support.");
1182 lcp_close(f->unit, "MPPE required but not available");
1188 MPPE frames **grow**. The kernel [must]
1199 * We have accepted MPPE or are willing to negotiate
1200 * MPPE parameters. A CONFREJ is due to subsequent
1201 * (non-MPPE) processing.
1205 #endif /* MPPE */
1347 #ifdef MPPE
1348 if (ret == CONFREJ && ao->mppe && rej_for_ci_mppe) {
1349 error("MPPE required but peer negotiation failed");
1350 lcp_close(f->unit, "MPPE required but peer negotiation failed");
1368 #ifdef MPPE
1374 slprintf(p, q - p, "MPPE ");
1376 if (opt->mppe & MPPE_OPT_128) {
1380 if (opt->mppe & MPPE_OPT_40) {
1384 if (opt->mppe & MPPE_OPT_STATEFUL)
1446 #ifdef MPPE
1447 if (go->mppe) {
1466 #ifdef MPPE
1467 if (ccp_gotoptions[f->unit].mppe) {
1468 ccp_gotoptions[f->unit].mppe = 0;
1471 error("MPPE disabled");
1472 lcp_close(f->unit, "MPPE disabled");
1532 #ifdef MPPE
1538 printer(arg, "mppe %s %s %s %s %s %s%s",
1637 #ifdef MPPE
1639 * If we were doing MPPE, we must also take the link down.
1641 if (ccp_gotoptions[unit].mppe) {
1642 error("Too many MPPE errors, closing LCP");
1643 lcp_close(unit, "Too many MPPE errors");