From 4db7479fef5512d1eedc37b6da50fe3462ada6f9 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Wed, 16 Aug 1995 04:15:38 +0000 Subject: [PATCH 1/1] Close ccp if we receive a term-ack and we're not asking for any compression. --- pppd/ccp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pppd/ccp.c b/pppd/ccp.c index 23fee58..ae67952 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -26,7 +26,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ccp.c,v 1.10 1995/06/06 01:52:23 paulus Exp $"; +static char rcsid[] = "$Id: ccp.c,v 1.11 1995/08/16 04:15:38 paulus Exp $"; #endif #include @@ -182,6 +182,14 @@ ccp_input(unit, p, len) fsm_input(f, p, len); if (oldstate == OPENED && p[0] == TERMREQ && f->state != OPENED) syslog(LOG_NOTICE, "Compression disabled by peer."); + + /* + * If we get a terminate-ack and we're not asking for compression, + * close CCP. + */ + if (oldstate == REQSENT && p[0] == TERMACK + && !ANY_COMPRESS(ccp_gotoptions[unit])) + ccp_close(unit); } /* -- 2.39.2