appneta / tcpreplay

Pcap editing and replay tools for *NIX and Windows - Users please download source from
http://tcpreplay.appneta.com/wiki/installation.html#downloads
1.17k stars 268 forks source link

tcprewrite stops with the error "Segmentation fault" #683

Closed iamppavel closed 2 years ago

iamppavel commented 2 years ago

Hello. Wile trying to add vlan tag 1 to the bigFlows.pcap stops with the fail state "Segmentation fault". The command is (for tcpreplay-edit result is the same)

tcprewrite --enet-vlan=add --enet-vlan-tag=1 --enet-vlan-pri=5 --enet-vlan-cfi=0 --infile=bigFlows.pcap --outfile=bigFlows_vlan1.pcap

The output file is only a part of incoming file

-rw-r--r-- 1 osboxes osboxes 368083648 Oct  5 14:23 bigFlows.pcap
-rw-r--r-- 1 root    root        94208 Oct  8 14:11 bigFlows_vlan1.pcap

The file "bigFlows.pcap" has been taken from https://s3.amazonaws.com/tcpreplay-pcap-files/bigFlows.pcap

OS Debian 10, VM VirtualBox

uname -a
Linux osboxes 5.10.0-0.bpo.3-amd64 #1 SMP Debian 5.10.13-1~bpo10+1 (2021-02-11) x86_64 GNU/Linux

Tcprewrite version

tcprewrite -V
tcprewrite version: 4.3.1 (build git:v4.3.1) (debug)
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.8.1
64 bit packet counters: enabled
Verbose printing via tcpdump: enabled
Fragroute engine: disabled
fklassen commented 2 years ago

Works for me on Linux Debian 9 and 4.3.1. Probably will work for you in 4.4.0 which adds fixes for VLAN in #677. Closing.