From: Paul Mackerras Date: Tue, 2 Mar 1999 05:33:09 +0000 (+0000) Subject: Make auth be the default if we don't have the noauth option and X-Git-Tag: RELEASE_2_3_6~21 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=0bd2372fb382e377762be7cf7b97ec0e2219e5be;hp=f82d2043bd8c28fc9cc88916920aac4856651978 Make auth be the default if we don't have the noauth option and we have a default route. --- diff --git a/pppd/auth.c b/pppd/auth.c index 5c1fbf1..47ecae3 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: auth.c,v 1.41 1999/02/26 10:38:50 paulus Exp $"; +static char rcsid[] = "$Id: auth.c,v 1.42 1999/03/02 05:33:09 paulus Exp $"; #endif #include @@ -628,6 +628,13 @@ auth_check_options() wo->neg_upap = 0; } + /* + * If we have a default route, require the peer to authenticate + * unless the noauth option was given. + */ + if (!auth_required && !allow_any_ip && have_route_to(0)) + auth_required = 1; + /* * Check whether we have appropriate secrets to use * to authenticate the peer.