diff options
author | David F. Skoll <dfs@roaringpenguin.com> | 2002-06-24 12:57:15 +0000 |
---|---|---|
committer | David F. Skoll <dfs@roaringpenguin.com> | 2002-06-24 12:57:15 +0000 |
commit | 05c09ae62d0b4ff67fb26c37a01e6a07bb593c0c (patch) | |
tree | 0bdca334a9a0238107df7e4233c23cb8f0d48db9 /pppd/ccp.c | |
parent | f488cb944f033b385052d44b8e0846880e80b5db (diff) | |
download | ppp-05c09ae62d0b4ff67fb26c37a01e6a07bb593c0c.tar.gz |
Patches from Frank Cusack:
- Avoid infinite loop (eventually running out of stack space) when doing
callback into ccp with MPPE enabled, by updating lcp_fsm state *before*
doing callbacks. Problem noted by Rustem Yumaev <rust@vostok-inc.com>.
- Add missing accounting attributes
- Update for newer automake; required to compile on RH 7.3
Diffstat (limited to 'pppd/ccp.c')
-rw-r--r-- | pppd/ccp.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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 <stdlib.h> #include <string.h> @@ -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 } |