Page MenuHomeFreeBSD

rip6: Fix handling of checksums in rip6_input()
ClosedPublic

Authored by markj on Thu, Jul 30, 6:52 PM.
Tags
None
Referenced Files
F165371114: D58559.id.diff
Fri, Aug 7, 9:15 PM
F165287522: D58559.diff
Fri, Aug 7, 10:38 AM
F165265667: D58559.id183127.diff
Fri, Aug 7, 7:01 AM
F165224541: D58559.diff
Thu, Aug 6, 11:35 PM
Unknown Object (File)
Wed, Aug 5, 9:46 AM
Unknown Object (File)
Wed, Aug 5, 9:31 AM
Unknown Object (File)
Mon, Aug 3, 3:48 AM
Unknown Object (File)
Mon, Aug 3, 12:56 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.Thu, Jul 30, 6:52 PM
This revision is now accepted and ready to land.Mon, Aug 3, 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: ".