X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Flcp.c;h=cd29c09b035b8d32a98b250db13d408335913007;hp=6da963161f31bc81cd0236fa80cee1e63f3e23d8;hb=28d813c39d5afb1243517d8c03a48685c6497b9c;hpb=f50d423b796b25ea4a7cf6f9fd33bfdb82546512 diff --git a/pppd/lcp.c b/pppd/lcp.c index 6da9631..cd29c09 100644 --- a/pppd/lcp.c +++ b/pppd/lcp.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: lcp.c,v 1.6 1994/05/26 06:37:19 paulus Exp $"; +static char rcsid[] = "$Id: lcp.c,v 1.11 1994/08/09 06:29:14 paulus Exp $"; #endif /* @@ -26,6 +26,7 @@ static char rcsid[] = "$Id: lcp.c,v 1.6 1994/05/26 06:37:19 paulus Exp $"; */ #include +#include #include #include #include @@ -34,8 +35,6 @@ static char rcsid[] = "$Id: lcp.c,v 1.6 1994/05/26 06:37:19 paulus Exp $"; #include #include -#include - #include "pppd.h" #include "ppp.h" #include "fsm.h" @@ -45,6 +44,10 @@ static char rcsid[] = "$Id: lcp.c,v 1.6 1994/05/26 06:37:19 paulus Exp $"; #include "upap.h" #include "ipcp.h" +#ifdef _linux_ /* Needs ppp ioctls */ +#include +#endif + /* global vars */ fsm lcp_fsm[NPPP]; /* LCP fsm structure (global)*/ lcp_options lcp_wantoptions[NPPP]; /* Options that we want to request */ @@ -813,7 +816,7 @@ lcp_nakci(f, p, len) if (f->state != OPENED) { *go = try; if (looped_back && try.numloops % lcp_warnloops == 0) - LCPDEBUG((LOG_INFO, "The line appears to be looped back.")); + syslog(LOG_WARNING, "Serial line appears to be looped back."); } return 1; @@ -1268,8 +1271,13 @@ lcp_up(f) ppp_send_config(f->unit, MIN(ao->mru, (ho->neg_mru? ho->mru: MTU)), (ho->neg_asyncmap? ho->asyncmap: 0xffffffff), ho->neg_pcompression, ho->neg_accompression); + /* + * If the asyncmap hasn't been negotiated, we really should + * set the receive asyncmap to ffffffff, but we set it to 0 + * for backwards contemptibility. + */ ppp_recv_config(f->unit, (go->neg_mru? MAX(wo->mru, go->mru): MTU), - (go->neg_asyncmap? go->asyncmap: 0xffffffff), + (go->neg_asyncmap? go->asyncmap: 0x00000000), go->neg_pcompression, go->neg_accompression); if (ho->neg_mru) @@ -1278,6 +1286,7 @@ lcp_up(f) ChapLowerUp(f->unit); /* Enable CHAP */ upap_lowerup(f->unit); /* Enable UPAP */ ipcp_lowerup(f->unit); /* Enable IPCP */ + ccp_lowerup(f->unit); /* Enable CCP */ lcp_echo_lowerup(f->unit); /* Enable echo messages */ link_established(f->unit); @@ -1294,6 +1303,7 @@ lcp_down(f) fsm *f; { lcp_echo_lowerdown(f->unit); + ccp_lowerdown(f->unit); ipcp_lowerdown(f->unit); ChapLowerDown(f->unit); upap_lowerdown(f->unit); @@ -1475,7 +1485,7 @@ void LcpLinkFailure (f) { if (f->state == OPENED) { syslog (LOG_NOTICE, "Excessive lack of response to LCP echo frames."); - lcp_lowerdown(f->unit); /* Reset connection */ + lcp_close(f->unit); /* Reset connection */ } }