TCP rewrite fails to parse input pcap file, exits with a TCPEDIT_SOFT_ERROR due to detection of TCPR_IPV6_NH_FRAGMENT in src/common/get.c.
Expected behavior:
TCP rewrite should change source and destination addresses (and all other packet header revisions),
even when the TCPR_IPV6_NH_FRAGMENT proto is set.
Screenshots
If applicable, add screenshots to help explain your problem.
System (please complete the following information):
OS: Linux
OS: Ubuntu
Tcpreplay Version:
tcprewrite version: 4.4.0 (build git:v4.4.0)
Copyright 2013-2022 by Fred Klassen - AppNeta
Copyright 2000-2012 by Aaron Turner
The entire Tcpreplay Suite is licensed under the GPLv3
Cache file supported: 04
Not compiled with libdnet.
Compiled against libpcap: 1.10.1
64 bit packet counters: enabled
Verbose printing via tcpdump: enabled
Fragroute engine: disabled
Additional context
IPv6 fragments contain valid data and should be handled.
This problem was introduced with version 4.3.0 with issue#488
see also issue#611, which fixed the failing case, but did not fix handling IPV6 fragment handling.
The error message was "Packet length 98 is to short to contain an IPv6 header for DLT 0x0001".
But fragment packets contain valid data.
Describe the bug
TCP rewrite fails to parse input pcap file, exits with a
TCPEDIT_SOFT_ERROR
due to detection ofTCPR_IPV6_NH_FRAGMENT
insrc/common/get.c
.Expected behavior: TCP rewrite should change source and destination addresses (and all other packet header revisions), even when the
TCPR_IPV6_NH_FRAGMENT
proto is set.To Reproduce Steps to reproduce the behavior:
Expected behavior
tcprewrite should not fail, and should rewrite the address:
Since packet does have data and packet headers are parse-able, tcprewrite should (a) overwrite IPs.
run tcpdump to show output unchanged:
Screenshots If applicable, add screenshots to help explain your problem.
System (please complete the following information):
Additional context IPv6 fragments contain valid data and should be handled. This problem was introduced with version 4.3.0 with issue#488 see also issue#611, which fixed the failing case, but did not fix handling IPV6 fragment handling. The error message was "Packet length 98 is to short to contain an IPv6 header for DLT 0x0001". But fragment packets contain valid data.
Additional context Failed pcap attached. afail1.pcap.gz