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)
Feb 23 2024, 8:08 PM
Unknown Object (File)
Dec 22 2023, 2:10 PM
Unknown Object (File)
Dec 20 2023, 4:11 AM
Unknown Object (File)
Sep 16 2023, 3:57 PM
Unknown Object (File)
Jul 9 2023, 11:47 PM
Unknown Object (File)
Jul 5 2023, 12:07 PM
Unknown Object (File)
Jul 5 2023, 11:56 AM
Unknown Object (File)
Jun 17 2023, 2:54 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.