From 1764436dfa4a561519a98a93036dd78b6a1d5a44 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 22 May 1997 06:45:59 +0000 Subject: [PATCH] fix compression negotiation --- pppd/ccp.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pppd/ccp.c b/pppd/ccp.c index 50cb92a..d4e3b3c 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ccp.c,v 1.20 1997/04/30 05:50:40 paulus Exp $"; +static char rcsid[] = "$Id: ccp.c,v 1.21 1997/05/22 06:45:59 paulus Exp $"; #endif #include @@ -526,7 +526,7 @@ ccp_nakci(f, p, len) || p[3] != DEFLATE_CHK_SEQUENCE) try.deflate = 0; else if (DEFLATE_SIZE(p[2]) < go->deflate_size) - go->deflate_size = DEFLATE_SIZE(p[2]); + try.deflate_size = DEFLATE_SIZE(p[2]); p += CILEN_DEFLATE; len -= CILEN_DEFLATE; } @@ -672,8 +672,9 @@ ccp_reqci(f, p, lenp, dont_nak) if (!dont_nak) { p[2] = DEFLATE_MAKE_OPT(ao->deflate_size); p[3] = DEFLATE_CHK_SEQUENCE; - } - break; + /* fall through to test this #bits below */ + } else + break; } /* @@ -710,9 +711,11 @@ ccp_reqci(f, p, lenp, dont_nak) if (BSD_VERSION(p[2]) != BSD_CURRENT_VERSION || nb > ao->bsd_bits || nb < BSD_MIN_BITS) { newret = CONFNAK; - if (!dont_nak) + if (!dont_nak) { p[2] = BSD_MAKE_OPT(BSD_CURRENT_VERSION, ao->bsd_bits); - break; + /* fall through to test this #bits below */ + } else + break; } /* -- 2.39.2