When sending UDP packets with the -x option, the checksum of the UDP is not adjusted. This causes packet receivers that verify the checksum to fail (e.g. socat). Either the checksum should be recalculated and adjusted or the checksum should be set to zero to indicate there is no checksum. Note that this likely applies to TCP packets as well, but I haven't tested that explicitly.
I have attached a pcap (bad_csum.pcap) file that contains two packets. The first was sent with the command
sudo packETHcli -m 2 -n 1 -i eno1 -f src-fwd.pcap -d 0
and the second was sent with the command
sudo packETHcli -m 2 -n 1 -i eno1 -f src-fwd.pcap -d 0 -x
The pcap shows that with -x the marker and sequence number are properly set, but the checksum is identical to that of the packet sent without the -x option. I have also attached the packet being sent as src-fwd.pcap.
bad_csum.zip
When sending UDP packets with the -x option, the checksum of the UDP is not adjusted. This causes packet receivers that verify the checksum to fail (e.g. socat). Either the checksum should be recalculated and adjusted or the checksum should be set to zero to indicate there is no checksum. Note that this likely applies to TCP packets as well, but I haven't tested that explicitly.
I have attached a pcap (bad_csum.pcap) file that contains two packets. The first was sent with the command
sudo packETHcli -m 2 -n 1 -i eno1 -f src-fwd.pcap -d 0and the second was sent with the command
sudo packETHcli -m 2 -n 1 -i eno1 -f src-fwd.pcap -d 0 -xThe pcap shows that with -x the marker and sequence number are properly set, but the checksum is identical to that of the packet sent without the -x option. I have also attached the packet being sent as src-fwd.pcap.
bad_csum.zip