From: Paul Mackerras Date: Mon, 12 Mar 2001 22:50:01 +0000 (+0000) Subject: don't insist on the suggested address from the secrets file X-Git-Tag: ppp-2.4.7~493 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=fe3b3b7599b968bc7b4e5a423bae0e17005f4bf1 don't insist on the suggested address from the secrets file unless it is the only authorized address --- diff --git a/pppd/auth.c b/pppd/auth.c index 9a6bfb1..94871bf 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -32,7 +32,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: auth.c,v 1.68 2001/03/08 05:11:10 paulus Exp $" +#define RCSID "$Id: auth.c,v 1.69 2001/03/12 22:50:01 paulus Exp $" #include #include @@ -1605,8 +1605,15 @@ set_allowed_addrs(unit, addrs, opts) * which is a single host, then use that if we find one. */ if (suggested_ip != 0 - && (wo->hisaddr == 0 || !auth_ip_addr(unit, wo->hisaddr))) + && (wo->hisaddr == 0 || !auth_ip_addr(unit, wo->hisaddr))) { wo->hisaddr = suggested_ip; + /* + * Do we insist on this address? No, if there are other + * addresses authorized than the suggested one. + */ + if (n > 1) + wo->accept_remote = 1; + } } /*