summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-ppp.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2008-10-10 15:24:24 +0000
committerclaudio <claudio@openbsd.org>2008-10-10 15:24:24 +0000
commitae69d725ea5ba59f9a9015777d7134bdb785e1ab (patch)
tree0e3509f4bd6b5daf88ccd826c506151209a2755d /usr.sbin/tcpdump/print-ppp.c
parentbackout; is causing some people difficulty (diff)
downloadwireguard-openbsd-ae69d725ea5ba59f9a9015777d7134bdb785e1ab.tar.xz
wireguard-openbsd-ae69d725ea5ba59f9a9015777d7134bdb785e1ab.zip
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');
}