* 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.39 2002/09/01 12:00:15 dfs Exp $"
#include <stdlib.h>
#include <string.h>
#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;
fsm_lowerdown(&ccp_fsm[unit]);
#ifdef MPPE
- if (ccp_gotoptions[unit].mppe)
+ if (ccp_gotoptions[unit].mppe) {
error("MPPE required but peer negotiation failed");
lcp_close(unit, "MPPE required but peer negotiation failed");
+ }
#endif
}
if (go->mppe) {
BZERO(mppe_recv_key, MPPE_MAX_KEY_LEN);
BZERO(mppe_send_key, MPPE_MAX_KEY_LEN);
- start_networks(f->unit); /* Bring up IP et al */
+ continue_networks(f->unit); /* Bring up IP et al */
}
#endif
}
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
}