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

[Bug] "IPv6 header version should be 6 but instead is" error reported for valid IPv6 packets #899

Open isambartm opened 2 weeks ago

isambartm commented 2 weeks ago

Replaying valid IPv6 traffic over Ethernet, I get the following error message for most packets (when first 4 bits of Ethernet Destination MAC not set to "6"):

Looking at where this error message is generated (flows.c, lines 242-248), it seems the IPv6 version may be checked using the wrong packet offset. This currently uses "packet[0]", but I think this may need to be "packet[l2len]" instead.

To Reproduce Steps to reproduce the behavior:

  1. Replay IPv6 traffic over Ethernet (first 4 bits of Ethernet Destination MAC should not be set to to "6")

Expected behavior Traffic should be replayed without error.

System (please complete the following information):

fklassen commented 2 weeks ago

Works for me. Please provide a packet capture and command-line syntax.

isambartm commented 2 weeks ago

Here is an example trace that shows this issue: https://wiki.wireshark.org/uploads/__moin_import__/attachments/SampleCaptures/v6-http.cap

I just replayed it using: tcpreplay -i v6-http.cap