Skip to content

Commit 1fa41f1

Browse files
committed
According to RFC 2516, use of the End-Of-List tag is not required, and
at least one PPPoE implementation doesn't put that tag into the tag list, so we can't ignore the payload length.
1 parent e19e0a8 commit 1fa41f1

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

print-pppoe.c

+1-16
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#ifndef lint
2525
static const char rcsid[] _U_ =
26-
"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.30 2004-08-27 03:57:41 guy Exp $ (LBL)";
26+
"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.31 2005-04-26 19:48:38 guy Exp $ (LBL)";
2727
#endif
2828

2929
#ifdef HAVE_CONFIG_H
@@ -138,21 +138,6 @@ pppoe_print(register const u_char *bp, u_int length)
138138
printf(" [ses 0x%x]", pppoe_sessionid);
139139
}
140140

141-
if (pppoe_length < length && length + ETHER_HDRLEN > 60) {
142-
/* (small packets are probably just padded up to the ethernet
143-
minimum of 60 bytes of data + 4 bytes of CRC) */
144-
printf(" [length %u (%u extra bytes)]",
145-
pppoe_length, length - pppoe_length);
146-
#if RESPECT_PAYLOAD_LENGTH
147-
if (snaplend > pppoe_payload+pppoe_length)
148-
snapend = pppoe_payload+pppoe_length;
149-
#else
150-
/* Actual PPPoE implementations appear to ignore the payload
151-
length and use the full ethernet frame anyways */
152-
pppoe_length = length;
153-
#endif
154-
}
155-
156141
if (pppoe_code) {
157142
/* PPP session packets don't contain tags */
158143
u_short tag_type = 0xffff, tag_len;

0 commit comments

Comments
 (0)