diff options
author | brian <brian@cvs.openbsd.org> | 1999-05-02 14:34:03 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1999-05-02 14:34:03 +0000 |
commit | 95c7a8329bf3d595c03555d07ecd662b7bc339dc (patch) | |
tree | 28734f55499021e67bb971c64366f8bb918e97e1 /usr.sbin | |
parent | 168c722497f7e5d1b552d426d860fe24efa391c4 (diff) |
Handle receiving more than one acceptable CCP REQ
during one negotiation session without REJecting
everything from the second REQuest.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/ppp/ccp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ppp/ppp/ccp.c b/usr.sbin/ppp/ppp/ccp.c index c039dbe6215..11412ebdb1c 100644 --- a/usr.sbin/ppp/ppp/ccp.c +++ b/usr.sbin/ppp/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.5 1999/03/31 14:22:10 brian Exp $ + * $Id: ccp.c,v 1.6 1999/05/02 14:34:02 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]; |