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
I am attempting to parse IPv4 packets with ipv4.ParseHeader. I get the network packets from a utun device, which meets the requirement for ipv4.ParseHeader:
The provided b must be in the format used by a raw IP socket on the local system.
However, two fields: TotalLen and FragOff are parsed incorrectly.
What did you expect to see?
The TotalLen field being less than the size of the packet that was received.
What did you see instead?
The TotalLen field was bigger than the (a) MTU (b) the size of the packet buffer (c) the packet that was read from the device, as the values have not been read in big endian.
The text was updated successfully, but these errors were encountered:
dmitshur
changed the title
golang.org/x/net: ipv4.ParseHeader will yield incorrect values on certain OSes
x/net/ipv4: ParseHeader will yield incorrect values on certain OSes
Jun 3, 2022
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I am attempting to parse IPv4 packets with ipv4.ParseHeader. I get the network packets from a
utun
device, which meets the requirement for ipv4.ParseHeader:What did you expect to see?
The TotalLen field being less than the size of the packet that was received.
What did you see instead?
The TotalLen field was bigger than the (a) MTU (b) the size of the packet buffer (c) the packet that was read from the device, as the values have not been read in big endian.
The text was updated successfully, but these errors were encountered: