From debad274d2013c4921a36d464e79a0f67a31b983 Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 22 May 2002 21:17:13 +0000 Subject: Increase the maximum FSM option length to 50 --- usr.sbin/ppp/fsm.c | 4 ++-- usr.sbin/ppp/fsm.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/ppp') diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c index 09bef00..ea24dd0 100644 --- a/usr.sbin/ppp/fsm.c +++ b/usr.sbin/ppp/fsm.c @@ -1144,9 +1144,9 @@ fsm_readopt(u_char **cp) *cp += o->hdr.len; if (o->hdr.len > sizeof(struct fsm_opt)) { + log_Printf(LogERROR, "Warning: Truncating option length from %d to %d\n", + o->hdr.len, sizeof(struct fsm_opt)); o->hdr.len = sizeof(struct fsm_opt); - log_Printf(LogERROR, "Warning: Truncating option length to %d\n", - o->hdr.len); } return o; diff --git a/usr.sbin/ppp/fsm.h b/usr.sbin/ppp/fsm.h index 2e57775..3280ba0 100644 --- a/usr.sbin/ppp/fsm.h +++ b/usr.sbin/ppp/fsm.h @@ -166,7 +166,7 @@ struct fsm_opt_hdr { u_char len; }; -#define MAX_FSM_OPT_LEN 20 +#define MAX_FSM_OPT_LEN 52 struct fsm_opt { struct fsm_opt_hdr hdr; u_char data[MAX_FSM_OPT_LEN-2]; -- cgit v1.1