From 315164071c5f6dc1c369ef22cd31ac8c3abd9d25 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Sun, 2 May 1999 14:33:39 +0000 Subject: [PATCH] Handle receiving more than one acceptable CCP REQ during one negotiation session without REJecting everything from the second REQuest. --- usr.sbin/ppp/ccp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c index 85d538550ed0..e5adc982f0aa 100644 --- a/usr.sbin/ppp/ccp.c +++ b/usr.sbin/ppp/ccp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ccp.c,v 1.44 1999/03/11 01:49:15 brian Exp $ + * $Id: ccp.c,v 1.45 1999/03/31 14:21:44 brian Exp $ * * TODO: * o Support other compression protocols @@ -411,10 +411,12 @@ CcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type, { /* Deal with incoming data */ struct ccp *ccp = fsm2ccp(fp); - int type, length; - int f; + int type, length, f; const char *end; + if (mode_type == MODE_REQ) + ccp->in.algorithm = -1; /* In case we've received two REQs in a row */ + while (plen >= sizeof(struct fsmconfig)) { type = *cp; length = cp[1];