summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pppd/auth.c26
-rw-r--r--usr.sbin/pppd/ipcp.c4
-rw-r--r--usr.sbin/pppd/main.c4
-rw-r--r--usr.sbin/pppd/patchlevel.h6
4 files changed, 27 insertions, 13 deletions
diff --git a/usr.sbin/pppd/auth.c b/usr.sbin/pppd/auth.c
index 6a63893..a564448 100644
--- a/usr.sbin/pppd/auth.c
+++ b/usr.sbin/pppd/auth.c
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: auth.c,v 1.17 1997/08/19 17:52:31 peter Exp $";
#endif
#include <stdio.h>
@@ -312,6 +312,10 @@ network_phase(unit)
if (protp->protocol != PPP_CCP)
++num_np_open;
}
+
+ if (num_np_open == 0)
+ /* nothing to do */
+ lcp_close(0, "No network protocols running");
}
/*
@@ -423,8 +427,14 @@ void
np_up(unit, proto)
int unit, proto;
{
- if (num_np_up == 0 && idle_time_limit > 0) {
- TIMEOUT(check_idle, NULL, idle_time_limit);
+ if (num_np_up == 0) {
+ /*
+ * At this point we consider that the link has come up successfully.
+ */
+ need_holdoff = 0;
+
+ if (idle_time_limit > 0)
+ TIMEOUT(check_idle, NULL, idle_time_limit);
/*
* Set a timeout to close the connection once the maximum
@@ -478,7 +488,6 @@ check_idle(arg)
if (itime >= idle_time_limit) {
/* link is idle: shut it down. */
syslog(LOG_INFO, "Terminating connection due to lack of activity.");
- need_holdoff = 0;
lcp_close(0, "Link inactive");
} else {
TIMEOUT(check_idle, NULL, idle_time_limit - itime);
@@ -966,6 +975,7 @@ get_pap_passwd(passwd)
{
char *filename;
FILE *f;
+ int ret;
struct wordlist *addrs;
char secret[MAXWORDLEN];
@@ -975,9 +985,11 @@ get_pap_passwd(passwd)
if (f == NULL)
return 0;
check_access(f, filename);
- if (scan_authfile(f, user,
- remote_name[0]? remote_name: NULL,
- (u_int32_t)0, secret, NULL, filename) < 0)
+ ret = scan_authfile(f, user,
+ remote_name[0]? remote_name: NULL,
+ (u_int32_t)0, secret, NULL, filename);
+ fclose(f);
+ if (ret < 0)
return 0;
if (passwd != NULL) {
strncpy(passwd, secret, MAXSECRETLEN);
diff --git a/usr.sbin/pppd/ipcp.c b/usr.sbin/pppd/ipcp.c
index 94dfd8d..b3973cf 100644
--- a/usr.sbin/pppd/ipcp.c
+++ b/usr.sbin/pppd/ipcp.c
@@ -18,7 +18,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: ipcp.c,v 1.9 1997/08/19 17:52:38 peter Exp $";
#endif
/*
@@ -1085,10 +1085,12 @@ ip_check_options()
option_error("remote IP address required for demand-dialling\n");
exit(1);
}
+#if 0
if (demand && wo->accept_remote) {
option_error("ipcp-accept-remote is incompatible with demand\n");
exit(1);
}
+#endif
}
diff --git a/usr.sbin/pppd/main.c b/usr.sbin/pppd/main.c
index d525258..916bd24 100644
--- a/usr.sbin/pppd/main.c
+++ b/usr.sbin/pppd/main.c
@@ -18,7 +18,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: main.c,v 1.13 1997/08/19 17:52:43 peter Exp $";
#endif
#include <stdio.h>
@@ -487,7 +487,7 @@ main(argc, argv)
while ((i = open(devnam, O_RDWR)) < 0) {
if (errno != EINTR)
syslog(LOG_ERR, "Failed to reopen %s: %m", devnam);
- if (!persist || errno != EINTR)
+ if (!persist || errno != EINTR || hungup || kill_link)
goto fail;
}
close(i);
diff --git a/usr.sbin/pppd/patchlevel.h b/usr.sbin/pppd/patchlevel.h
index 37321a6..d0e64b8 100644
--- a/usr.sbin/pppd/patchlevel.h
+++ b/usr.sbin/pppd/patchlevel.h
@@ -1,6 +1,6 @@
-/* $Id$ */
-#define PATCHLEVEL 0
+/* $Id: patchlevel.h,v 1.6 1997/08/19 17:52:44 peter Exp $ */
+#define PATCHLEVEL 1
#define VERSION "2.3"
#define IMPLEMENTATION ""
-#define DATE "22 May 97"
+#define DATE "27 June 97"
OpenPOWER on IntegriCloud