Page MenuHomeFreeBSD

Don't send ICMPv6 packets when the checksum is wrong
ClosedPublic

Authored by tuexen on Apr 19 2019, 4:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 9 2024, 6:02 AM
Unknown Object (File)
Sep 5 2024, 8:51 PM
Unknown Object (File)
Aug 22 2024, 6:17 AM
Unknown Object (File)
Aug 22 2024, 5:16 AM
Unknown Object (File)
Aug 21 2024, 6:28 PM
Unknown Object (File)
Aug 17 2024, 8:56 PM
Unknown Object (File)
Aug 10 2024, 10:36 PM
Unknown Object (File)
May 30 2024, 9:34 PM
Subscribers

Details

Summary

This patch fixes the following issue related to the IPPROTO_IPV6 level socket option IPV6_CHECKSUM:

When receiving a packet with an incorrect checksum, just discard it and don't send an ICMP message indicating a parameter problem.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Again, can you you please mention rip6_input() in the commit message?

No matter how often I read the message I still wonder "why discard rather than sending an ICMPv6 message?" Maybe elaborating on it a bit more might help.

This revision is now accepted and ready to land.Apr 19 2019, 5:20 PM
sys/netinet6/raw_ip6.c
170 ↗(On Diff #56388)

Somehow I hate the buttons down taking my comments away...

I had written:
(a) please try not to initialise further variables at declaration time. (style)
(b) given we allow the use of bool in the kernel, this would suffice.
(c) or you could just add a comment down there and set proto = IPPROTO_NONE and be done without an extra variable.

In either way, I consider it a style fix. The functional change seems correct.

Integrate change suggested by bz@.

This revision now requires review to proceed.Apr 19 2019, 5:39 PM
tuexen added inline comments.
sys/netinet6/raw_ip6.c
170 ↗(On Diff #56388)

I agree and used (c).

This revision is now accepted and ready to land.Apr 19 2019, 5:52 PM
This revision was automatically updated to reflect the committed changes.
tuexen marked an inline comment as done.