summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump/print-ppp.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-10-10 15:24:25 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-10-10 15:24:25 +0000
commit9c7cc8d15233c2301c337dfdcb31f2636d94b93f (patch)
tree32ed16f17545f17d74af063652ebf081284279ce /usr.sbin/tcpdump/print-ppp.c
parent0642d6c99ec292a993ae1b7d730a53f5b8f26706 (diff)
Fix -X output of ppp packets. Inspired by PR4624 and especially the patch
provided by canacar@. I just modified it a bit to skip the data link proto number as well. OK deraadt@
Diffstat (limited to 'usr.sbin/tcpdump/print-ppp.c')
-rw-r--r--usr.sbin/tcpdump/print-ppp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/tcpdump/print-ppp.c b/usr.sbin/tcpdump/print-ppp.c
index 572ef450320..50048942a95 100644
--- a/usr.sbin/tcpdump/print-ppp.c
+++ b/usr.sbin/tcpdump/print-ppp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ppp.c,v 1.19 2007/10/07 16:41:05 deraadt Exp $ */
+/* $OpenBSD: print-ppp.c,v 1.20 2008/10/10 15:24:24 claudio Exp $ */
/*
* Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Id: print-ppp.c,v 1.19 2007/10/07 16:41:05 deraadt Exp $ (LBL)";
+ "@(#) $Id: print-ppp.c,v 1.20 2008/10/10 15:24:24 claudio Exp $ (LBL)";
#endif
#ifdef PPP
@@ -678,9 +678,7 @@ ppp_ether_if_print(user, h, p)
printf("\n\t%04x: ", proto);
if (xflag)
- default_print((const u_char *)
- (p + sizeof(struct pppoe_header)),
- caplen - sizeof(struct pppoe_header));
+ default_print(p + 2, caplen - 2);
putchar('\n');
}