diff options
author | peter <peter@FreeBSD.org> | 1998-03-22 05:33:08 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-03-22 05:33:08 +0000 |
commit | 485f592474900427073918c54f598c8260bba25d (patch) | |
tree | ddd0042aa4a673594cff43c0c4610d35d95cc316 /usr.sbin/pppd/lcp.c | |
parent | e8b6792d29b46bb961a633ba7d8c7a7192506db2 (diff) | |
download | FreeBSD-src-485f592474900427073918c54f598c8260bba25d.zip FreeBSD-src-485f592474900427073918c54f598c8260bba25d.tar.gz |
Merge ppp-2.3.3 changes onto mainline
Diffstat (limited to 'usr.sbin/pppd/lcp.c')
-rw-r--r-- | usr.sbin/pppd/lcp.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/usr.sbin/pppd/lcp.c b/usr.sbin/pppd/lcp.c index 325806b..f4920ba 100644 --- a/usr.sbin/pppd/lcp.c +++ b/usr.sbin/pppd/lcp.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: lcp.c,v 1.7 1997/08/19 17:52:40 peter Exp $"; #endif /* @@ -266,7 +266,7 @@ lcp_lowerup(unit) */ ppp_set_xaccm(unit, xmit_accm[unit]); ppp_send_config(unit, PPP_MRU, 0xffffffff, 0, 0); - ppp_recv_config(unit, PPP_MRU, 0x00000000, + ppp_recv_config(unit, PPP_MRU, 0xffffffff, wo->neg_pcompression, wo->neg_accompression); peer_mru[unit] = PPP_MRU; lcp_allowoptions[unit].asyncmap = xmit_accm[unit][0]; @@ -785,7 +785,7 @@ lcp_nakci(f, p, len) */ if (go->neg_mru && go->mru != DEFMRU) { NAKCISHORT(CI_MRU, neg_mru, - if (cishort <= wo->mru || cishort < DEFMRU) + if (cishort <= wo->mru || cishort <= DEFMRU) try.mru = cishort; ); } @@ -1484,13 +1484,8 @@ lcp_up(f) ppp_send_config(f->unit, MIN(ao->mru, (ho->neg_mru? ho->mru: PPP_MRU)), (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): PPP_MRU), - (go->neg_asyncmap? go->asyncmap: 0x00000000), + (go->neg_asyncmap? go->asyncmap: 0xffffffff), go->neg_pcompression, go->neg_accompression); if (ho->neg_mru) @@ -1519,7 +1514,7 @@ lcp_down(f) ppp_send_config(f->unit, PPP_MRU, 0xffffffff, 0, 0); ppp_recv_config(f->unit, PPP_MRU, - (go->neg_asyncmap? go->asyncmap: 0x00000000), + (go->neg_asyncmap? go->asyncmap: 0xffffffff), go->neg_pcompression, go->neg_accompression); peer_mru[f->unit] = PPP_MRU; } @@ -1807,7 +1802,7 @@ LcpSendEchoRequest (f) * Detect the failure of the peer at this point. */ if (lcp_echo_fails != 0) { - if (lcp_echos_pending++ >= lcp_echo_fails) { + if (lcp_echos_pending >= lcp_echo_fails) { LcpLinkFailure(f); lcp_echos_pending = 0; } @@ -1821,6 +1816,7 @@ LcpSendEchoRequest (f) pktp = pkt; PUTLONG(lcp_magic, pktp); fsm_sdata(f, ECHOREQ, lcp_echo_number++ & 0xFF, pkt, pktp - pkt); + ++lcp_echos_pending; } } |