HomeFreeBSD

icmp: improve INVARIANTS check

Description

icmp: improve INVARIANTS check

Actually check the conditions that 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

Perform the checks consistently for ICMPv4 and ICMPv6.

Reviewed by: glebius, rrs, cc
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D48001
Approved by: re (cperciva)

(cherry picked from commit c9febea3dc8ac8e308e8fc5a2e74dd0313fdc5d2)
(cherry picked from commit bd6a89a6c32a0f5b08182ea06e625a6695f3fbb0)

Details

Provenance
tuexenAuthored on Dec 12 2024, 2:40 PM
Reviewer
glebius
Differential Revision
D48001: icmp: improve INVARIANTS check
Parents
rGa3b66c4bf0e2: icmp: correct the assertion that checks limit + jitter
Branches
Unknown
Tags
Unknown