summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguy <guy>2000-09-24 08:08:56 +0000
committerguy <guy>2000-09-24 08:08:56 +0000
commit6b33165a8fc70eac6dae78d230ed42f8684e03ff (patch)
tree0c6fa42b19cd099607369da3e114b7e134ee19bb
parent09a08a47f6329b6782c5f547738980f67ed30bfe (diff)
downloadtcpdump-6b33165a8fc70eac6dae78d230ed42f8684e03ff.tar.gz
Fix the code to handle the Password Authentication Protocol
Authenticate-Ack and Authenticate-Nak packets to do a length check based on "msg_len", which we set in that case, rather than "passwd_len", which we don't. Thanks and a tip of the Hatlo Hat to some non-GCC compiler - I forget which one - that noticed that we were using a variable which we hadn't necessarily set.
-rw-r--r--print-ppp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/print-ppp.c b/print-ppp.c
index ee8160d3..e66717ec 100644
--- a/print-ppp.c
+++ b/print-ppp.c
@@ -31,7 +31,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.47 2000-09-23 08:54:37 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.48 2000-09-24 08:08:56 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -736,7 +736,7 @@ handle_chap(const u_char *p, int length)
}
}
-/* PAP */
+/* PAP (see RFC 1334) */
static void
handle_pap(const u_char *p, int length)
{
@@ -798,7 +798,7 @@ handle_pap(const u_char *p, int length)
return;
msg_len = *p; /* Msg-Length */
p++;
- if (length - (p - p0) < passwd_len)
+ if (length - (p - p0) < msg_len)
return;
printf(", Msg=");
for (i = 0; i< msg_len; i++)