From 306c565c67e78d7c84c297d1951b66058512c5f8 Mon Sep 17 00:00:00 2001 From: brian Date: Sat, 27 Nov 1999 18:04:57 +0000 Subject: Pass the pppoe packets into do_ppp_print correctly. --- contrib/tcpdump/print-ppp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'contrib/tcpdump') diff --git a/contrib/tcpdump/print-ppp.c b/contrib/tcpdump/print-ppp.c index d6d3475..b5052c7 100644 --- a/contrib/tcpdump/print-ppp.c +++ b/contrib/tcpdump/print-ppp.c @@ -588,13 +588,11 @@ pppoe_print(const u_char *p, u_int length) ntohs(*(u_short *)(p + 2)), len); if (type == 0x00) { - p += 4; - length -= 4; - if (len > length) - len = length; /* puke ! */ /* This is a data packet */ + p += 4; fputs("] ", stdout); - do_ppp_print(p, len, len); + /* If eflag is set, ignore the trailing 2 bytes for LCP... */ + do_ppp_print(p, eflag ? len - 2 : len + 2, len + 4); return; } -- cgit v1.1