X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fipcp.c;h=6bcdf74e9410295b5353a6c144ab7b2fbf84c308;hb=ab4d4992050ec171e1c72d661a3457efc8e7c141;hp=fcf17b1e7472dcb4bc8c07c0b73827daf1e92c5f;hpb=9fe8923419a954fedf8b6d1a6cc07b45f165c1ab;p=ppp.git diff --git a/pppd/ipcp.c b/pppd/ipcp.c index fcf17b1..6bcdf74 100644 --- a/pppd/ipcp.c +++ b/pppd/ipcp.c @@ -40,6 +40,10 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + /* * TODO: */ @@ -678,8 +682,9 @@ ipcp_resetci(fsm *f) ipcp_options *go = &ipcp_gotoptions[f->unit]; ipcp_options *ao = &ipcp_allowoptions[f->unit]; - wo->req_addr = (wo->neg_addr || wo->old_addrs) && - (ao->neg_addr || ao->old_addrs); + wo->req_addr = ((wo->neg_addr || wo->old_addrs) && + (ao->neg_addr || ao->old_addrs)) || + (wo->hisaddr && !wo->accept_remote); if (wo->ouraddr == 0) wo->accept_local = 1; if (wo->hisaddr == 0) @@ -1648,7 +1653,8 @@ endswitch: * option safely. */ if (rc != CONFREJ && !ho->neg_addr && !ho->old_addrs && - wo->req_addr && !reject_if_disagree && !noremoteip) { + wo->req_addr && !reject_if_disagree && + ((wo->hisaddr && !wo->accept_remote) || !noremoteip)) { if (rc == CONFACK) { rc = CONFNAK; ucp = inp; /* reset pointer */