X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fauth.c;h=47ecae36f341d8302ce4a7f65a91c7f868eaeaac;hp=5c1fbf1f52c92167479069dab68013e738b3b9f9;hb=0bd2372fb382e377762be7cf7b97ec0e2219e5be;hpb=f82d2043bd8c28fc9cc88916920aac4856651978 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.