From: Paul Mackerras Date: Thu, 18 Jan 1996 03:13:09 +0000 (+0000) Subject: Allow other CCP options to follow X-Git-Tag: RELEASE_2_3_6~533 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=3da550efb3dc7c6dfb697792f5cc8bc7c0f776e3 Allow other CCP options to follow --- diff --git a/NeXT/bsd-comp.c b/NeXT/bsd-comp.c index 0e3dd41..1124855 100644 --- a/NeXT/bsd-comp.c +++ b/NeXT/bsd-comp.c @@ -49,7 +49,7 @@ /* * This version is for use with mbufs on BSD-derived systems. * - * $Id: bsd-comp.c,v 1.1 1995/12/18 03:30:00 paulus Exp $ + * $Id: bsd-comp.c,v 1.2 1996/01/18 03:12:26 paulus Exp $ */ #include @@ -459,7 +459,7 @@ bsd_init(db, options, opt_len, unit, hdrlen, mru, debug, decomp) { int i; - if (opt_len != CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS + if (opt_len < CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS || BSD_VERSION(options[2]) != BSD_CURRENT_VERSION || BSD_NBITS(options[2]) != db->maxbits diff --git a/freebsd-2.0/bsd-comp.c b/freebsd-2.0/bsd-comp.c index e34c32a..d128e0c 100644 --- a/freebsd-2.0/bsd-comp.c +++ b/freebsd-2.0/bsd-comp.c @@ -40,7 +40,7 @@ /* * This version is for use with mbufs on BSD-derived systems. * - * $Id: bsd-comp.c,v 1.1 1995/10/27 03:35:14 paulus Exp $ + * $Id: bsd-comp.c,v 1.2 1996/01/18 03:12:35 paulus Exp $ */ #include @@ -406,7 +406,7 @@ bsd_init(db, options, opt_len, unit, hdrlen, mru, debug, decomp) { int i; - if (opt_len != CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS + if (opt_len < CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS || BSD_VERSION(options[2]) != BSD_CURRENT_VERSION || BSD_NBITS(options[2]) != db->maxbits diff --git a/linux/bsd_comp.c b/linux/bsd_comp.c index 508db4f..bb523bd 100644 --- a/linux/bsd_comp.c +++ b/linux/bsd_comp.c @@ -49,7 +49,7 @@ * install a new bsd_comp.c file. Don't change the format of that * line otherwise, so the installation script can recognize it. * - * $Id: bsd_comp.c,v 1.2 1995/12/18 03:37:05 paulus Exp $ + * $Id: bsd_comp.c,v 1.3 1996/01/18 03:12:47 paulus Exp $ */ #ifndef MODULE @@ -501,7 +501,9 @@ static int bsd_init (void *state, unsigned char *options, struct bsd_db *db = state; int indx; - if ((opt_len != 3) || (options[0] != CI_BSD_COMPRESS) || (options[1] != 3) + if ((opt_len < CILEN_BSD_COMPRESS) + || (options[0] != CI_BSD_COMPRESS) + || (options[1] != CILEN_BSD_COMPRESS) || (BSD_VERSION(options[2]) != BSD_CURRENT_VERSION) || (BSD_NBITS(options[2]) != db->maxbits) || (decomp && db->lens == NULL)) diff --git a/modules/bsd-comp.c b/modules/bsd-comp.c index a9cf15b..d9e9fe9 100644 --- a/modules/bsd-comp.c +++ b/modules/bsd-comp.c @@ -41,7 +41,7 @@ * This version is for use with STREAMS under SunOS 4.x, * DEC Alpha OSF/1, AIX 4.x, and SVR4 systems including Solaris 2. * - * $Id: bsd-comp.c,v 1.17 1995/12/11 02:57:48 paulus Exp $ + * $Id: bsd-comp.c,v 1.18 1996/01/18 03:12:53 paulus Exp $ */ #ifdef AIX4 @@ -50,10 +50,7 @@ #include #include #include -#include -#include #include -#include #include "ppp_mod.h" #ifdef SVR4 @@ -422,7 +419,8 @@ bsd_init(db, options, opt_len, unit, hdrlen, mru, debug, decomp) { int i; - if (opt_len != 3 || options[0] != CI_BSD_COMPRESS || options[1] != 3 + if (opt_len < CILEN_BSD_COMPRESS + || options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS || BSD_VERSION(options[2]) != BSD_CURRENT_VERSION || BSD_NBITS(options[2]) != db->maxbits || decomp && db->lens == NULL) diff --git a/netbsd-1.1/bsd-comp.c b/netbsd-1.1/bsd-comp.c index a86183b..7a66ac5 100644 --- a/netbsd-1.1/bsd-comp.c +++ b/netbsd-1.1/bsd-comp.c @@ -1,4 +1,4 @@ -/* $Id: bsd-comp.c,v 1.1 1995/12/11 05:17:05 paulus Exp $ */ +/* $Id: bsd-comp.c,v 1.2 1996/01/18 03:13:03 paulus Exp $ */ /* Because this code is derived from the 4.3BSD compress source: * @@ -42,7 +42,7 @@ /* * This version is for use with mbufs on BSD-derived systems. * - * $Id: bsd-comp.c,v 1.1 1995/12/11 05:17:05 paulus Exp $ + * $Id: bsd-comp.c,v 1.2 1996/01/18 03:13:03 paulus Exp $ */ #include @@ -309,7 +309,7 @@ bsd_alloc(options, opt_len, decomp) u_int newlen, hsize, hshift, maxmaxcode; struct bsd_db *db; - if (opt_len != CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS + if (opt_len < CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS || BSD_VERSION(options[2]) != BSD_CURRENT_VERSION) return NULL; @@ -407,7 +407,7 @@ bsd_init(db, options, opt_len, unit, hdrlen, mru, debug, decomp) { int i; - if (opt_len != CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS + if (opt_len < CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS || BSD_VERSION(options[2]) != BSD_CURRENT_VERSION || BSD_NBITS(options[2]) != db->maxbits diff --git a/ultrix/bsd-comp.c b/ultrix/bsd-comp.c index 933a5cc..12bca92 100644 --- a/ultrix/bsd-comp.c +++ b/ultrix/bsd-comp.c @@ -40,7 +40,7 @@ /* * This version is for use with mbufs on Ultrix systems. * - * $Id: bsd-comp.c,v 1.5 1995/05/02 02:48:14 paulus Exp $ + * $Id: bsd-comp.c,v 1.6 1996/01/18 03:13:09 paulus Exp $ */ #include "../h/param.h" @@ -416,7 +416,7 @@ bsd_init(db, options, opt_len, unit, hdrlen, mru, debug, decomp) { int i; - if (opt_len != CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS + if (opt_len < CILEN_BSD_COMPRESS || options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS || BSD_VERSION(options[2]) != BSD_CURRENT_VERSION || BSD_NBITS(options[2]) != db->maxbits