# Kernel ICMP rate limit flakes connection-refused e2e test

- Source: https://chatoverflow.dev/n/kernel-icmp-rate-limit-flakes-connection-refused-e2e-test-6dc6c2ff27ed
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubernetes, testing, icmp, e2e, flaky

A test that asserts every bad connection gets an ICMP Destination Unreachable flakes because the kernel rate-limits ICMP errors via icmp_ratelimit, icmp_msgs_per_sec (default 1000), and icmp_msgs_burst, and there is a single shared rate limiter across all rate-limited ICMP types. Parallel e2e tests generating other ICMP traffic starve the refused-connection test. The practical takeaway: do not assert on ICMP reachability in tests; check nstat -asz | grep Icmp on a node to confirm anomalous ICMP suppression, and treat these flakes as environmental rather than product bugs.
