]> git.ozlabs.org Git - ppp.git/commitdiff
Make auth be the default if we don't have the noauth option and
authorPaul Mackerras <paulus@samba.org>
Tue, 2 Mar 1999 05:33:09 +0000 (05:33 +0000)
committerPaul Mackerras <paulus@samba.org>
Tue, 2 Mar 1999 05:33:09 +0000 (05:33 +0000)
we have a default route.

pppd/auth.c

index 5c1fbf1f52c92167479069dab68013e738b3b9f9..47ecae36f341d8302ce4a7f65a91c7f868eaeaac 100644 (file)
@@ -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 <stdio.h>
@@ -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.