From 824bbd34978e1c928e6bb285435fab7890eb13ef Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Tue, 2 Jun 2020 10:12:42 -0700 Subject: [PATCH] Bug #571 Increase SNAPLEN to 262144 --- src/defines.h.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/defines.h.in b/src/defines.h.in index 118097e2a..26a29323e 100644 --- a/src/defines.h.in +++ b/src/defines.h.in @@ -149,12 +149,17 @@ typedef struct tcpr_speed_s { #define MAX_FILES 1024 /* Max number of files we can pass to tcpreplay */ #define DEFAULT_MTU 1500 /* Max Transmission Unit of standard ethernet - * don't forget *frames* are MTU + L2 header! */ + * don't forget *frames* are MTU + L2 header! + */ -#define MAXPACKET 65549 /* was 16436 linux loopback, but maybe something is bigger then - linux loopback */ +#define MAX_SNAPLEN 262144 /* tell libpcap to capture the entire packet + * this is the maximum size supported by libpcap + * (https://github.com/the-tcpdump-group/libpcap/blob/master/pcap-int.h#L99-L125) + */ -#define MAX_SNAPLEN 65535 /* tell libpcap to capture the entire packet */ +#define MAXPACKET (MAX_SNAPLEN + 14) /* snap length plus some room for adding a + * couple VLAN headers or a L2 header + */ #define DNS_RESOLVE 1 #define DNS_DONT_RESOLVE 0