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
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D48001

(cherry picked from commit c9febea3dc8ac8e308e8fc5a2e74dd0313fdc5d2)

Details

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