From 9c7cc8d15233c2301c337dfdcb31f2636d94b93f Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 10 Oct 2008 15:24:25 +0000 Subject: 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@ --- usr.sbin/tcpdump/print-ppp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'usr.sbin') 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'); } -- cgit v1.2.3