X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Flcp.c;h=23f69fe5f0360a10f7c1b34a16b90da19037cf4a;hb=6849615c460f11e9c267059af5dbe93813fbe456;hp=a06300aeb73e3c21739ca824c6490776b8a89305;hpb=637346ba24c289c5a0485651c05baa3f7c22a6b8;p=ppp.git diff --git a/pppd/lcp.c b/pppd/lcp.c index a06300a..23f69fe 100644 --- a/pppd/lcp.c +++ b/pppd/lcp.c @@ -40,7 +40,7 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define RCSID "$Id: lcp.c,v 1.72 2004/11/12 10:30:51 paulus Exp $" +#define RCSID "$Id: lcp.c,v 1.74 2004/11/13 02:28:15 paulus Exp $" /* * TODO: @@ -206,7 +206,7 @@ static void lcp_resetci __P((fsm *)); /* Reset our CI */ static int lcp_cilen __P((fsm *)); /* Return length of our CI */ static void lcp_addci __P((fsm *, u_char *, int *)); /* Add our CI to pkt */ static int lcp_ackci __P((fsm *, u_char *, int)); /* Peer ack'd our CI */ -static int lcp_nakci __P((fsm *, u_char *, int)); /* Peer nak'd our CI */ +static int lcp_nakci __P((fsm *, u_char *, int, int)); /* Peer nak'd our CI */ static int lcp_rejci __P((fsm *, u_char *, int)); /* Peer rej'd our CI */ static int lcp_reqci __P((fsm *, u_char *, int *, int)); /* Rcv peer CI */ static void lcp_up __P((fsm *)); /* We're UP */ @@ -365,9 +365,6 @@ lcp_init(unit) ao->neg_magicnumber = 1; ao->neg_pcompression = 1; ao->neg_accompression = 1; -#ifdef CBCP_SUPPORT - ao->neg_cbcp = 1; -#endif ao->neg_endpoint = 1; } @@ -927,10 +924,11 @@ bad: * 1 - Nak was good. */ static int -lcp_nakci(f, p, len) +lcp_nakci(f, p, len, treat_as_reject) fsm *f; u_char *p; int len; + int treat_as_reject; { lcp_options *go = &lcp_gotoptions[f->unit]; lcp_options *wo = &lcp_wantoptions[f->unit]; @@ -1187,7 +1185,9 @@ lcp_nakci(f, p, len) */ if (go->neg_mrru) { NAKCISHORT(CI_MRRU, neg_mrru, - if (cishort <= wo->mrru) + if (treat_as_reject) + try.neg_mrru = 0; + else if (cishort <= wo->mrru) try.mrru = cishort; ); }