Home | History | Annotate | Download | only in pppd

Lines Matching refs: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]);
909 #ifdef MPPE
910 if (go->mppe && len >= CILEN_MPPE
912 no.mppe = 1;
917 MPPE_CI_TO_OPTS(&p[2], try.mppe);
918 if ((try.mppe & MPPE_OPT_STATEFUL) && refuse_mppe_stateful) {
919 error("Refusing MPPE stateful mode offered by peer");
920 try.mppe = 0;
921 } else if (((go->mppe | MPPE_OPT_STATEFUL) & try.mppe) != try.mppe) {
923 try.mppe = 0;
926 if (!try.mppe) {
927 error("MPPE required but peer negotiation failed");
928 lcp_close(f->unit, "MPPE required but peer negotiation failed");
931 #endif /* MPPE */
1003 #ifdef MPPE
1004 if (go->mppe && len >= CILEN_MPPE
1006 error("MPPE required but peer refused");
1007 lcp_close(f->unit, "MPPE required but peer refused");
1079 #ifdef MPPE
1103 #ifdef MPPE
1105 if (!ao->mppe || clen != CILEN_MPPE) {
1109 MPPE_CI_TO_OPTS(&p[2], ho->mppe);
1112 if (ho->mppe & MPPE_OPT_UNSUPPORTED) {
1114 ho->mppe &= ~MPPE_OPT_UNSUPPORTED;
1116 if (ho->mppe & MPPE_OPT_UNKNOWN) {
1118 ho->mppe &= ~MPPE_OPT_UNKNOWN;
1122 if (ho->mppe & MPPE_OPT_STATEFUL) {
1127 * the Internet -- which is where we expect MPPE.
1130 error("Refusing MPPE stateful mode offered by peer");
1137 if ((ho->mppe & MPPE_OPT_128)
1138 && (ho->mppe & MPPE_OPT_40)) {
1141 if (ao->mppe & MPPE_OPT_128)
1142 ho->mppe &= ~MPPE_OPT_40;
1143 else if (ao->mppe & MPPE_OPT_40)
1144 ho->mppe &= ~MPPE_OPT_128;
1149 } else if (ho->mppe & MPPE_OPT_128) {
1150 if (!(ao->mppe & MPPE_OPT_128)) {
1154 } else if (ho->mppe & MPPE_OPT_40) {
1155 if (!(ao->mppe & MPPE_OPT_40)) {
1166 MPPE_OPTS_TO_CI(ho->mppe, &p[2]);
1177 error("MPPE required, but kernel has no support.");
1178 lcp_close(f->unit, "MPPE required but not available");
1184 * because MPPE frames **grow**. The kernel [must]
1195 * We have accepted MPPE or are willing to negotiate
1196 * MPPE parameters. A CONFREJ is due to subsequent
1197 * (non-MPPE) processing.
1201 #endif /* MPPE */
1343 #ifdef MPPE
1344 if (ret == CONFREJ && ao->mppe && rej_for_ci_mppe) {
1345 error("MPPE required but peer negotiation failed");
1346 lcp_close(f->unit, "MPPE required but peer negotiation failed");
1364 #ifdef MPPE
1370 slprintf(p, q - p, "MPPE ");
1372 if (opt->mppe & MPPE_OPT_128) {
1376 if (opt->mppe & MPPE_OPT_40) {
1380 if (opt->mppe & MPPE_OPT_STATEFUL)
1442 #ifdef MPPE
1443 if (go->mppe) {
1462 #ifdef MPPE
1463 if (ccp_gotoptions[f->unit].mppe) {
1464 ccp_gotoptions[f->unit].mppe = 0;
1467 error("MPPE disabled");
1468 lcp_close(f->unit, "MPPE disabled");
1528 #ifdef MPPE
1534 printer(arg, "mppe %s %s %s %s %s %s%s",
1633 #ifdef MPPE
1635 * If we were doing MPPE, we must also take the link down.
1637 if (ccp_gotoptions[unit].mppe) {
1638 error("Too many MPPE errors, closing LCP");
1639 lcp_close(unit, "Too many MPPE errors");