summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp/auth.c')
-rw-r--r--usr.sbin/ppp/auth.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c
index c857e02767e4..ceeb8137367f 100644
--- a/usr.sbin/ppp/auth.c
+++ b/usr.sbin/ppp/auth.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: auth.c,v 1.35 1999/01/28 01:56:30 brian Exp $
+ * $Id: auth.c,v 1.36 1999/02/01 13:42:24 brian Exp $
*
* TODO:
* o Implement check against with registered IP addresses.
@@ -31,10 +31,12 @@
#include <pwd.h>
#include <stdio.h>
#include <string.h>
+#include <termios.h>
#include <unistd.h>
#include "mbuf.h"
#include "defs.h"
+#include "log.h"
#include "timer.h"
#include "fsm.h"
#include "iplist.h"
@@ -56,6 +58,11 @@
#ifndef NORADIUS
#include "radius.h"
#endif
+#include "cbcp.h"
+#include "chap.h"
+#include "async.h"
+#include "physical.h"
+#include "datalink.h"
#include "bundle.h"
const char *
@@ -273,8 +280,10 @@ AuthTimeout(void *vauthp)
if (--authp->retry > 0) {
timer_Start(&authp->authtimer);
(*authp->ChallengeFunc)(authp, ++authp->id, authp->physical);
- } else if (authp->FailedFunc)
- (*authp->FailedFunc)(authp->physical);
+ } else {
+ log_Printf(LogPHASE, "Auth: No response from server\n");
+ datalink_AuthNotOk(authp->physical->dl);
+ }
}
void
@@ -286,11 +295,9 @@ auth_Init(struct authinfo *authinfo)
void
auth_StartChallenge(struct authinfo *authp, struct physical *physical,
- void (*chal)(struct authinfo *, int, struct physical *),
- void (*fail)(struct physical *))
+ void (*chal)(struct authinfo *, int, struct physical *))
{
authp->ChallengeFunc = chal;
- authp->FailedFunc = fail;
authp->physical = physical;
timer_Stop(&authp->authtimer);
authp->authtimer.func = AuthTimeout;