From: Paul Mackerras Date: Thu, 12 Aug 1999 04:22:53 +0000 (+0000) Subject: maxfail option, exit code for when when we fail to auth X-Git-Tag: ppp-2.4.7~669 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=a3e53f0632f8b502ca070e048f27c523a668a7dc;hp=ee0fba791a4db3588ec086b43ff982bf14265301 maxfail option, exit code for when when we fail to auth ourselves to the peer. --- diff --git a/pppd/pppd.8 b/pppd/pppd.8 index 664e932..a7b4db8 100644 --- a/pppd/pppd.8 +++ b/pppd/pppd.8 @@ -1,5 +1,5 @@ .\" manual page [] for pppd 2.3 -.\" $Id: pppd.8,v 1.42 1999/08/04 15:53:13 johnsonm Exp $ +.\" $Id: pppd.8,v 1.43 1999/08/12 04:22:53 paulus Exp $ .\" SH section heading .\" SS subsection heading .\" LP paragraph @@ -455,6 +455,10 @@ Terminate the connection when it has been available for network traffic for \fIn\fR seconds (i.e. \fIn\fR seconds after the first network control protocol comes up). .TP +.B maxfail \fIn +Terminate after \fIn\fR consecutive failed connection attempts. A +value of 0 means no limit. The default value is 10. +.TP .B modem Use the modem control lines. This option is the default. With this option, pppd will wait for the CD (Carrier Detect) signal from the @@ -1152,6 +1156,9 @@ The PPP negotiation failed because serial loopback was detected. .TP .B 18 The init script failed (returned a non-zero exit status). +.TP +.B 19 +We failed to authenticate ourselves to the peer. .SH SCRIPTS Pppd invokes scripts at various stages in its processing which can be used to perform site-specific ancillary processing. These scripts are diff --git a/pppd/pppd.h b/pppd/pppd.h index c7ddd3b..2ce8519 100644 --- a/pppd/pppd.h +++ b/pppd/pppd.h @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: pppd.h,v 1.42 1999/07/21 00:24:32 paulus Exp $ + * $Id: pppd.h,v 1.43 1999/08/12 04:22:53 paulus Exp $ */ /* @@ -160,6 +160,7 @@ extern int log_to_fd; /* logging to this fd as well as syslog */ extern char *no_ppp_msg; /* message to print if ppp not in kernel */ extern volatile int status; /* exit status for pppd */ extern int devnam_fixed; /* can no longer change devnam */ +extern int unsuccess; /* # unsuccessful connection attempts */ /* * Variables set by command-line options. @@ -183,7 +184,7 @@ extern char *welcomer; /* Script to welcome client after connection */ extern char *ptycommand; /* Command to run on other side of pty */ extern int maxconnect; /* Maximum connect time (seconds) */ extern char user[MAXNAMELEN];/* Our name for authenticating ourselves */ -extern char passwd[MAXSECRETLEN]; /* Password for PAP */ +extern char passwd[MAXSECRETLEN]; /* Password for PAP or CHAP */ extern bool auth_required; /* Peer is required to authenticate */ extern bool persist; /* Reopen link after it goes down */ extern bool uselogin; /* Use /etc/passwd for checking PAP */ @@ -198,6 +199,7 @@ extern int holdoff; /* Dead time before restarting */ extern bool notty; /* Stdin/out is not a tty */ extern char *record_file; /* File to record chars sent/received */ extern bool sync_serial; /* Device is synchronous serial device */ +extern int maxfail; /* Max # of unsuccessful connection attempts */ #ifdef PPP_FILTER extern struct bpf_program pass_filter; /* Filter for pkts to pass */ @@ -531,6 +533,7 @@ extern struct option_info ptycommand_info; #define EXIT_HANGUP 16 #define EXIT_LOOPBACK 17 #define EXIT_INIT_FAILED 18 +#define EXIT_AUTH_TOPEER_FAILED 19 /* * Debug macros. Slightly useful for finding bugs in pppd, not particularly