-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPv4 Checksum fails (due to tcp offloading) #9
Comments
Might be due to tcp checksum offloading. You can try disabling it:
Is the packet in your wireshark screenshot the same one in your example? The checksums seem to be different. On another topic: I added a new version of decapsulate/1 to pkt: pkt/decode/1,2. I will push it in a bit. decapsulate/1 will now crash on any error. Use it when you only care about valid packets. You can catch the crash: Packet = try pkt:decapsulate(Frame)
catch
error:_ -> invalid_packet
end decode/1,2 looks like: case pkt:decode(Frame) of % can also specify the protocol pkt:decode(tcp, Frame)
{ok, [#ether{}, #ipv4{}, #tcp{}, Payload]} ->
Payload;
{error, [#ether{}, #ipv4{}], {tcp, Data} = Failed} ->
... This should deal with truncated packets using the snaplen option or malformed packets. Sound ok? |
|
Thanks for the link! |
I have the case that wireshark and pkt calculate (the identical) checksum error, but my linux pc acknowledges the packet.
Thus either wireshark and pkt have both the same error, pcap has an error or my Linux-PC does not calculate the TCP checksum before acknowledging the packet.
The pcap file is available upon request. Any ideas?
The text was updated successfully, but these errors were encountered: