From: Jesper Peterson (jesper@endace.com)
Date: 07/21/03
Message-ID: <3F1B767D.905@endace.com> Date: Mon, 21 Jul 2003 17:13:33 +1200 From: Jesper Peterson <jesper@endace.com> Subject: tcptrace patch: fix calculation of plast in tcpdump.c
Most link types result in an incorrect plast calculation in tcpdump.c because
ip_buf is currently an int* but offsets are in bytes. There doesn't seem to be
any need for ip_buf to be in ints so a patch to change to char* appears below.
Alternatively all references to ip_buf+blah should have ip_buf cast to char*
as it is for DLT_EN10MB and a few others.
--- tcpdump.c-orig Fri Mar 7 08:02:02 2003
+++ tcpdump.c Mon Jul 21 17:00:47 2003
@@ -77,7 +77,7 @@
/* Interaction with pcap */
static struct ether_header eth_header;
#define EH_SIZE sizeof(struct ether_header)
-static int *ip_buf; /* [IP_MAXPACKET/sizeof(int)] */
+static char *ip_buf; /* [IP_MAXPACKET] */
static struct pcap_pkthdr *callback_phdr;
static void *callback_plast;
-- Jesper Peterson, Senior Software Developer http://www.endace.com, +64 7 839 0540 ---------------------------------------------------------------------------- To unsubscribe, send a message with body containing "unsubscribe tcptrace" to majordomo@tcptrace.org.
This archive was generated by hypermail 2.1.7 : 07/21/03 EDT