Page MenuHomeFreeBSD

rip6: Fix handling of checksums in rip6_input()
ClosedPublic

Authored by markj on Jul 30 2026, 6:52 PM.
Tags
None
Referenced Files
F170714797: D58559.id183437.diff
Sun, Sep 6, 4:26 AM
F170681123: D58559.id.diff
Sun, Sep 6, 12:14 AM
F170626200: D58559.diff
Sat, Sep 5, 5:08 PM
F170607938: D58559.id183437.diff
Sat, Sep 5, 3:12 PM
F170607225: D58559.id183437.diff
Sat, Sep 5, 3:07 PM
Unknown Object (File)
Sat, Sep 5, 5:41 AM
Unknown Object (File)
Sat, Sep 5, 1:31 AM
Unknown Object (File)
Thu, Sep 3, 11:17 PM

Details

Summary

A v6 raw socket may ask the kernel to validate the checksum of an
inbound packet. If so, and the validation fails, we discard the packet,
but this isn't really right: other raw sockets may wish to receive a
copy of the packet anyway.

Rework checksum handling to address this problem, and use a flag to
avoid computing the checksum more than once for a given packet.

Fixes: de2d47842e880281 ("SMR protection for inpcbs")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jul 30 2026, 6:52 PM
This revision is now accepted and ready to land.Aug 3 2026, 8:37 AM

I'd suggest to change commit header to "raw ip6: Fix handling of checksums in rip6_input()", or "rawip: ...". The "rip" abbreviation can be easily confused with routing protocol. Unfortunately, I already made a precedent in the past with "rip: " header. And you already pushed changes with a better "rawip: " header to this file. The IPv4 sibling has quite a long precedence of using "raw ip: ".