X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fccp.c;h=23fee58446584ece466faafcedd4155ad773feac;hb=e46557418647a48bb018edf58a2bdb6ff9e57ef6;hp=90a7ff190156c72bbf68d536b0c94944c00096f9;hpb=cd28744f82dfd8cfddc67dcf12ca57b91ca6f4c2;p=ppp.git diff --git a/pppd/ccp.c b/pppd/ccp.c index 90a7ff1..23fee58 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ccp.c,v 1.7 1995/04/24 06:01:18 paulus Exp $"; +static char rcsid[] = "$Id: ccp.c,v 1.10 1995/06/06 01:52:23 paulus Exp $"; #endif #include @@ -109,10 +109,11 @@ ccp_init(unit) memset(&ccp_allowoptions[unit], 0, sizeof(ccp_options)); memset(&ccp_hisoptions[unit], 0, sizeof(ccp_options)); + ccp_wantoptions[0].bsd_compress = 1; ccp_wantoptions[0].bsd_bits = 12; /* default value */ ccp_allowoptions[0].bsd_compress = 1; - ccp_allowoptions[0].bsd_bits = MAX_BSD_BITS; + ccp_allowoptions[0].bsd_bits = BSD_MAX_BITS; } /* @@ -432,10 +433,10 @@ ccp_reqci(f, p, lenp, dont_nak) || nb > ao->bsd_bits) { newret = CONFNAK; nb = ao->bsd_bits; - } else if (nb < MIN_BSD_BITS) { + } else if (nb < BSD_MIN_BITS) { newret = CONFREJ; } else if (!ccp_test(f->unit, p, CILEN_BSD_COMPRESS, 1)) { - if (nb > MIN_BSD_BITS) { + if (nb > BSD_MIN_BITS) { --nb; newret = CONFNAK; } else @@ -452,6 +453,8 @@ ccp_reqci(f, p, lenp, dont_nak) } } + if (newret == CONFNAK && dont_nak) + newret = CONFREJ; if (!(newret == CONFACK || newret == CONFNAK && ret == CONFREJ)) { /* we're returning this option */ if (newret == CONFREJ && ret == CONFNAK)