X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fccp.c;h=8ff92f3be179b6824050a833a88d57afe712fca9;hp=3e408ba27f6e4339174dccad4e2f23f012eca99a;hb=05c09ae62d0b4ff67fb26c37a01e6a07bb593c0c;hpb=f488cb944f033b385052d44b8e0846880e80b5db;ds=sidebyside diff --git a/pppd/ccp.c b/pppd/ccp.c index 3e408ba..8ff92f3 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -25,7 +25,7 @@ * OR MODIFICATIONS. */ -#define RCSID "$Id: ccp.c,v 1.36 2002/05/28 17:00:57 dfs Exp $" +#define RCSID "$Id: ccp.c,v 1.37 2002/06/24 12:57:15 dfs Exp $" #include #include @@ -37,7 +37,7 @@ #ifdef MPPE #include "chap_ms.h" /* mppe_xxxx_key */ -#include "lcp.h" /* lcp_close() */ +#include "lcp.h" /* lcp_close(), lcp_fsm */ #endif static const char rcsid[] = RCSID; @@ -1438,8 +1438,12 @@ ccp_down(f) ccp_flags_set(f->unit, 1, 0); #ifdef MPPE if (ccp_gotoptions[f->unit].mppe) { - error("MPPE disabled"); - lcp_close(f->unit, "MPPE disabled"); + ccp_gotoptions[f->unit].mppe = 0; + if (lcp_fsm[f->unit].state == OPENED) { + /* If LCP is not already going down, make sure it does. */ + error("MPPE disabled"); + lcp_close(f->unit, "MPPE disabled"); + } } #endif }