- 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
-#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>
#include <stdlib.h>
#include <string.h>
#ifdef MPPE
#include "chap_ms.h" /* mppe_xxxx_key */
#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;
#endif
static const char rcsid[] = RCSID;
ccp_flags_set(f->unit, 1, 0);
#ifdef MPPE
if (ccp_gotoptions[f->unit].mppe) {
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");
+ }
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#define RCSID "$Id: fsm.c,v 1.17 1999/08/13 06:46:12 paulus Exp $"
+#define RCSID "$Id: fsm.c,v 1.18 2002/06/24 12:57:15 dfs Exp $"
info("%s terminated by peer (%0.*v)", PROTO_NAME(f), len, p);
} else
info("%s terminated by peer", PROTO_NAME(f));
info("%s terminated by peer (%0.*v)", PROTO_NAME(f), len, p);
} else
info("%s terminated by peer", PROTO_NAME(f));
- if (f->callbacks->down)
- (*f->callbacks->down)(f); /* Inform upper layers */
f->retransmits = 0;
f->state = STOPPING;
f->retransmits = 0;
f->state = STOPPING;
+ if (f->callbacks->down)
+ (*f->callbacks->down)(f); /* Inform upper layers */
TIMEOUT(fsm_timeout, f, f->timeouttime);
break;
}
TIMEOUT(fsm_timeout, f, f->timeouttime);
break;
}
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
+[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
ATTRIBUTE Acct-Session-Id 44 string
ATTRIBUTE Acct-Authentic 45 integer
ATTRIBUTE Acct-Session-Time 46 integer
ATTRIBUTE Acct-Session-Id 44 string
ATTRIBUTE Acct-Authentic 45 integer
ATTRIBUTE Acct-Session-Time 46 integer
+ATTRIBUTE Acct-Input-Packets 47 integer
+ATTRIBUTE Acct-Output-Packets 48 integer
ATTRIBUTE Acct-Terminate-Cause 49 integer
ATTRIBUTE Chap-Challenge 60 string
ATTRIBUTE NAS-Port-Type 61 integer
ATTRIBUTE Acct-Terminate-Cause 49 integer
ATTRIBUTE Chap-Challenge 60 string
ATTRIBUTE NAS-Port-Type 61 integer