x/net/ipv4: wrong endianness in IP header on darwin-amd64 #32118
Labels
help wanted
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Darwin
Milestone
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?
marshall IPv4 IP header with x/net/ipv4/header, but I got little-endian instead of big-endian.
What did you expect to see?
Got big-endian IP header len.
What did you see instead?
little-endian
Looking at By looking at the code https://github.com/golang/net/blob/master/ipv4/header.go#L71., for darwin, 32bit/64bit os should have a different conversion.
Darwin amd64 is little-endian, it should convert.
The text was updated successfully, but these errors were encountered: