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
Unknown Object (File)
Fri, Sep 11, 2:12 AM
Unknown Object (File)
Fri, Sep 11, 12:46 AM
Unknown Object (File)
Thu, Sep 10, 6:58 PM
Unknown Object (File)
Tue, Sep 8, 11:57 PM
Unknown Object (File)
Tue, Sep 8, 12:48 AM
Unknown Object (File)
Mon, Sep 7, 6:51 PM
Unknown Object (File)
Mon, Sep 7, 5:12 PM
Unknown Object (File)
Sun, Sep 6, 4:26 AM

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: ".