X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fccp.c;h=ae6795228c64655c07e427ae6f944213631ce7b3;hb=6bca842794ae41bfc71bdf27cde3bf6ecd843540;hp=23fee58446584ece466faafcedd4155ad773feac;hpb=fcdd79cf516672a47a3dd24b8e01071763f62110;p=ppp.git 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); } /*