X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=modules%2Fbsd-comp.c;h=d9e9fe9f1a7764c85cb8a5ce5c38116fd1f95201;hb=6bc4d0f6371848be1a79d7c741db029605e7dbdc;hp=a9cf15be8f4a56faf9d4683e509c394c03d7fcf7;hpb=f13292b8db4daea707d462ddcea4f03616de976b;p=ppp.git 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)