x/net/icmp: checksums are not checked when parsing a message #70340
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.23.2 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I'm working with the
icmp
package, and I noticed theParseMessage
function only stores the checksum in the returned message. There is no check using that checksum, nor any function available to run this checksum check.On the other hand, in the
Marshal
method, the checksum is calculated.What did you see happen?
No checksum check done when decoding an icmp message.
What did you expect to see?
A checksum check done when decoding an icmp message.
Since this check is rather cheap to run on a tiny amount of data (the icmp header), I think we could just have it as a part of the parsing function, and NOT export the checksum function.
The text was updated successfully, but these errors were encountered: