X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=pppd%2Fipcp.c;h=d95b69b910f2dd41277e16d7445f841d8b50f3c1;hb=5cb32f1c7e8584994a2c887cb7a3d9823068d2ce;hp=302ca40b4c83cecce9098bfff17dfe75b0bedba0;hpb=30f457205c6a52b291a7ddfbbbec87c8c19ab22a;p=ppp.git diff --git a/pppd/ipcp.c b/pppd/ipcp.c index 302ca40..d95b69b 100644 --- a/pppd/ipcp.c +++ b/pppd/ipcp.c @@ -994,6 +994,7 @@ bad: static int ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) { + ipcp_options *wo = &ipcp_wantoptions[f->unit]; ipcp_options *go = &ipcp_gotoptions[f->unit]; u_char cimaxslotindex, cicflag; u_char citype, cilen, *next; @@ -1169,7 +1170,7 @@ ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) GETLONG(l, p); ciaddr1 = htonl(l); if (ciaddr1 && go->accept_local) - try.ouraddr = ciaddr1; + try.ouraddr = wo->old_addrs ? ciaddr1 : 0; GETLONG(l, p); ciaddr2 = htonl(l); if (ciaddr2 && go->accept_remote) @@ -1184,7 +1185,7 @@ ipcp_nakci(fsm *f, u_char *p, int len, int treat_as_reject) ciaddr1 = htonl(l); if (ciaddr1 && go->accept_local) try.ouraddr = ciaddr1; - if (try.ouraddr != 0) + if (try.ouraddr != 0 && wo->neg_addr) try.neg_addr = 1; no.neg_addr = 1; break; @@ -1470,7 +1471,7 @@ ipcp_reqci(fsm *f, u_char *inp, int *len, int reject_if_disagree) if (ciaddr2 != wo->ouraddr) { if (ciaddr2 == 0 || !wo->accept_local) { orc = CONFNAK; - if (!reject_if_disagree) { + if (!reject_if_disagree && wo->old_addrs) { DECPTR(sizeof(u_int32_t), p); tl = ntohl(wo->ouraddr); PUTLONG(tl, p);