x/net: invalid address when reading socket error queue with SO_TIMESTAMPING #47926
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?In my
go.mod
:Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputMy Linux kernel is:
$ uname -a Linux mitinarseny 5.13.8_1 #1 SMP Wed Aug 4 15:28:27 UTC 2021 x86_64 GNU/Linux
What did you do?
I am trying to implement socket timestamps in pingo.
Firstly, create socket with following:
Then, create
ipv4.PacketConn
:Then I am trying to receive multiple messages with from socket's error queue:
What did you expect to see?
Nil error
What did you see instead?
The error at this point is following:
Which originates from here:
https://github.com/golang/net/blob/60bc85c4be6d32924bcfddb728394cb8713f2c78/internal/socket/rawconn_mmsg.go#L22-L24
https://github.com/golang/net/blob/60bc85c4be6d32924bcfddb728394cb8713f2c78/internal/socket/sys_posix.go#L67-L70
I guess, kernel does not put any address for transmit timestamp messages, so there should be nothing to parse. This leads to an error, which is created by
errors.New
, which is unable to detect witherrors.Is
from the perspective of caller.The text was updated successfully, but these errors were encountered: