diff options
author | brian <brian@FreeBSD.org> | 1999-11-27 18:04:57 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-11-27 18:04:57 +0000 |
commit | 306c565c67e78d7c84c297d1951b66058512c5f8 (patch) | |
tree | 50c744f28f329b68a8ffaaa05c2eaaa4357c4e58 /contrib | |
parent | dc2c10cce6de08ff32a8a4e44eb00db4e49076bb (diff) | |
download | FreeBSD-src-306c565c67e78d7c84c297d1951b66058512c5f8.zip FreeBSD-src-306c565c67e78d7c84c297d1951b66058512c5f8.tar.gz |
Pass the pppoe packets into do_ppp_print correctly.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/tcpdump/print-ppp.c | 8 |
1 files changed, 3 insertions, 5 deletions
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; } |