summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/auth.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-02-01 13:42:25 +0000
committerbrian <brian@FreeBSD.org>1999-02-01 13:42:25 +0000
commita66fe159a89a7ea089f4d8eef24fc04ea7ab7e07 (patch)
tree963ff4db128e6327d53d4ce1d2dfc2ba5226283c /usr.sbin/ppp/auth.c
parent7c096f22d6d34034cc3e1211010451159156a9b8 (diff)
downloadFreeBSD-src-a66fe159a89a7ea089f4d8eef24fc04ea7ab7e07.zip
FreeBSD-src-a66fe159a89a7ea089f4d8eef24fc04ea7ab7e07.tar.gz
If we receive no answer from the server when sending PAP
requests, give up (don't sit there indefinitely).
Diffstat (limited to 'usr.sbin/ppp/auth.c')
-rw-r--r--usr.sbin/ppp/auth.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c
index f9cc803..c857e02 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.34 1998/12/17 00:28:12 brian Exp $
+ * $Id: auth.c,v 1.35 1999/01/28 01:56:30 brian Exp $
*
* TODO:
* o Implement check against with registered IP addresses.
@@ -273,7 +273,8 @@ 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);
}
void
@@ -285,9 +286,11 @@ auth_Init(struct authinfo *authinfo)
void
auth_StartChallenge(struct authinfo *authp, struct physical *physical,
- void (*fn)(struct authinfo *, int, struct physical *))
+ void (*chal)(struct authinfo *, int, struct physical *),
+ void (*fail)(struct physical *))
{
- authp->ChallengeFunc = fn;
+ authp->ChallengeFunc = chal;
+ authp->FailedFunc = fail;
authp->physical = physical;
timer_Stop(&authp->authtimer);
authp->authtimer.func = AuthTimeout;
OpenPOWER on IntegriCloud