X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Flcp.c;h=23f69fe5f0360a10f7c1b34a16b90da19037cf4a;hb=4abe4296f0eddbb2b6ff11dbbd27100156c85f87;hp=7a5ae2f49e7fc9613211d779f4e1246c86ea2b11;hpb=b98e5a6bed67f50cdfad054ea6576f59b9a0c482;p=ppp.git diff --git a/pppd/lcp.c b/pppd/lcp.c index 7a5ae2f..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.73 2004/11/12 11:42:46 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 */ @@ -924,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]; @@ -1184,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; ); }