Page MenuHomeFreeBSD

icmp: improve INVARIANTS check
ClosedPublic

Authored by tuexen on Dec 9 2024, 4:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 7, 2:06 PM
Unknown Object (File)
Fri, Jul 4, 12:21 PM
Unknown Object (File)
Mon, Jun 23, 1:55 PM
Unknown Object (File)
Sun, Jun 15, 3:26 AM
Unknown Object (File)
Jun 7 2025, 8:51 AM
Unknown Object (File)
May 31 2025, 6:18 AM
Unknown Object (File)
May 30 2025, 6:37 AM
Unknown Object (File)
May 29 2025, 8:37 PM
Subscribers

Details

Summary

Actually check the conditions, which are enforced by the error checking code instead of a condition which is

  • checking a number to be non-negative instead of positive
  • depending on a random number

Diff Detail

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

Event Timeline

tuexen requested review of this revision.Dec 9 2024, 4:41 PM
This revision is now accepted and ready to land.Dec 9 2024, 7:54 PM

Additional comment:

% sysctl -d net.inet.icmp.icmplim_jitter
net.inet.icmp.icmplim_jitter: Random icmplim jitter adjustment limit

May document this net.inet.icmp.icmplim_jitter in ICMP(4).

glebius requested changes to this revision.Dec 10 2024, 7:05 PM

Thanks! Please apply same changes to netinet6/icmp6.c

This revision now requires changes to proceed.Dec 10 2024, 7:05 PM

Consistently handle ICMPv4 and ICMPv6 as suggested by Gleb.

Thanks! Please apply same changes to netinet6/icmp6.c

Done. Thanks.

In D48001#1094461, @cc wrote:

Additional comment:

% sysctl -d net.inet.icmp.icmplim_jitter
net.inet.icmp.icmplim_jitter: Random icmplim jitter adjustment limit

May document this net.inet.icmp.icmplim_jitter in ICMP(4).

Improved man page in D48025.

This revision is now accepted and ready to land.Dec 12 2024, 1:56 PM
This revision was automatically updated to reflect the committed changes.