You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When rewrite IP address for a .pcap file using tcprewrite, if I set --infile and --outfile to the same filename, the output file seems to be truncated (the original file contains 27 packets but the output file contains only 4 pacekts. This would happen for --pnat and -e options.
To Reproduce
Steps to reproduce the behavior:
Use tcprewrite --pnat=192.168.5.0/24:10.4.0.0/24 --infile=xxx.pcapng --outfile=xxx.pcapng.
The file xxx.pcapng would be truncated to have few pacekts.
Expected behavior
The resulting .pcap file should not be truncated, but only IP modified. I'm not sure if the in-place modification is not supported or a bug. Since I have many .pcap files, setting --infile and --outfile to different files would occupy much space. Currently a quick workaround for me is to write a script which use different --infile and --outfile and then delete the --infile.
I'm sorry that I didn't find similar issues here or on Stack Overflow. Any suggestions are appreciated! :)
Screenshots
The original file content:
After using tcprewrite for IP address modification in a in-place manner:
System (please complete the following information):
OS: Ubuntu
OS version 20.04.6 LTS
Tcpreplay Version 4.3.2 (installed using apt install)
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
When rewrite IP address for a
.pcap
file using tcprewrite, if I set--infile
and--outfile
to the same filename, the output file seems to be truncated (the original file contains 27 packets but the output file contains only 4 pacekts. This would happen for--pnat
and-e
options.To Reproduce
Steps to reproduce the behavior:
tcprewrite --pnat=192.168.5.0/24:10.4.0.0/24 --infile=xxx.pcapng --outfile=xxx.pcapng
.xxx.pcapng
would be truncated to have few pacekts.Expected behavior
The resulting
.pcap file
should not be truncated, but only IP modified. I'm not sure if the in-place modification is not supported or a bug. Since I have many.pcap
files, setting--infile
and--outfile
to different files would occupy much space. Currently a quick workaround for me is to write a script which use different--infile
and--outfile
and then delete the--infile
.I'm sorry that I didn't find similar issues here or on Stack Overflow. Any suggestions are appreciated! :)
Screenshots

The original file content:
After using tcprewrite for IP address modification in a in-place manner:

System (please complete the following information):
apt install
)Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: