-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Description
Steps to reproduce the behavior:
- Loading a PCAP using
$ sudo tcpreplay -i lo mine.pcap
- results in
safe_pcap_next ERROR: Invalid packet length in send_packets.c:get_next_packet() line 1068: 92442 is greater than maximum 65549
Digging into source code, It looks like there are packages within the PCAP over the MAXPACKET variable, which is why the code fails here. I suggest upgrading MAXPACKET from 65549 to 131098 in here.
So:
#define MAXPACKET 65549 /* was 16436 linux loopback, but maybe something is bigger then
linux loopback */
#define MAX_SNAPLEN 65535 /* tell libpcap to capture the entire packet */
Will become:
#define MAXPACKET 131098 /* was 16436 linux loopback, but maybe something is bigger then
linux loopback */
#define MAX_SNAPLEN 131098 /* tell libpcap to capture the entire packet */
I just want to know, if you see any problems here. I am also a bit worried about the comment 16436 linux loopback, which looks like I should go with anouther type of interface to replay on.
System (please complete the following information):
- Ubuntu 18.04
cgi@cgires:~$ sudo tcpreplay -V
tcpreplay version: 4.3.2 (build git:v4.3.2)
Copyright 2013-2018 by Fred Klassen <tcpreplay at appneta dot com> - AppNeta
Copyright 2000-2012 by Aaron Turner <aturner at synfin dot net>
The entire Tcpreplay Suite is licensed under the GPLv3
Cache file supported: 04
Not compiled with libdnet.
Compiled against libpcap: 1.9.1
64 bit packet counters: enabled
Verbose printing via tcpdump: enabled
Packet editing: disabled
Fragroute engine: disabled
Injection method: PF_PACKET send()
Not compiled with netmap
Additional context
Could provide example PCAP private.
Reactions are currently unavailable