X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fccp.c;fp=pppd%2Fccp.c;h=0e768b71ad2d426982fc3cdefb0b3c8718a68fe9;hb=e50870a901749c7390109404e90c095ea3ef7072;hp=18f2dc0cdbd871e6f6b613b7a7e3f185c943cc20;hpb=fc8efe940e9364ffd8d05023f0d96747f854388b;p=ppp.git diff --git a/pppd/ccp.c b/pppd/ccp.c index 18f2dc0..0e768b7 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -33,7 +33,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: ccp.c,v 1.41 2002/12/04 23:03:32 paulus Exp $" +#define RCSID "$Id: ccp.c,v 1.42 2002/12/23 23:24:37 fcusack Exp $" #include #include @@ -44,7 +44,7 @@ #include #ifdef MPPE -#include "chap_ms.h" /* mppe_xxxx_key */ +#include "chap_ms.h" /* mppe_xxxx_key, mppe_keys_set */ #include "lcp.h" /* lcp_close(), lcp_fsm */ #endif @@ -578,6 +578,14 @@ ccp_resetci(f) return; } + /* A plugin (eg radius) may not have obtained key material. */ + if (!mppe_keys_set) { + error("MPPE required, but keys are not available. " + "Possible plugin problem?"); + lcp_close(f->unit, "MPPE required but not available"); + return; + } + /* LM auth not supported for MPPE */ if (auth_done[f->unit] & (CHAP_MS_WITHPEER | CHAP_MS_PEER)) { /* This might be noise */