summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-05-02 14:33:39 +0000
committerbrian <brian@FreeBSD.org>1999-05-02 14:33:39 +0000
commit4418c9ba633b0e845402d78aa862b0cdfc10741f (patch)
tree6a6bfe3746f4bd3e6f1126378d14a54dd4bc8d44 /usr.sbin/ppp
parent97aab710a2f6203613df23d6d3073caf7a107caf (diff)
downloadFreeBSD-src-4418c9ba633b0e845402d78aa862b0cdfc10741f.zip
FreeBSD-src-4418c9ba633b0e845402d78aa862b0cdfc10741f.tar.gz
Handle receiving more than one acceptable CCP REQ
during one negotiation session without REJecting everything from the second REQuest.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/ccp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index 85d5385..e5adc98 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];
OpenPOWER on IntegriCloud