summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/pap.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/pap.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/pap.c')
-rw-r--r--usr.sbin/ppp/pap.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/ppp/pap.c b/usr.sbin/ppp/pap.c
index 9bdbb93..02fb329 100644
--- a/usr.sbin/ppp/pap.c
+++ b/usr.sbin/ppp/pap.c
@@ -18,7 +18,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: pap.c,v 1.27 1998/08/26 18:07:57 brian Exp $
+ * $Id: pap.c,v 1.28 1999/01/28 01:56:33 brian Exp $
*
* TODO:
*/
@@ -138,6 +138,14 @@ PapValidate(struct bundle *bundle, u_char *name, u_char *key,
}
void
+pap_Failed(struct physical *p)
+{
+ auth_StopTimer(&p->dl->pap);
+ log_Printf(LogPHASE, "Pap: No response from server\n");
+ datalink_AuthNotOk(p->dl);
+}
+
+void
pap_Input(struct bundle *bundle, struct mbuf *bp, struct physical *physical)
{
int len = mbuf_Length(bp);
@@ -167,7 +175,6 @@ pap_Input(struct bundle *bundle, struct mbuf *bp, struct physical *physical)
* told that I got the answer right.
*/
datalink_AuthOk(physical->dl);
-
} else {
SendPapCode(php->id, PAP_NAK, "Login incorrect", physical);
datalink_AuthNotOk(physical->dl);
OpenPOWER on IntegriCloud