sing-tun-lx/ping
世界 23a39c59be
ping: Fix stale flows kept alive by unrelated ICMP traffic
Unconnected raw ICMP sockets receive every ICMP packet arriving at the
host, so any ICMP traffic refreshed the read deadline of every flow and
stale flows (with their raw sockets and goroutines) accumulated forever,
making per-ping cost grow linearly with uptime.

Expire flows based on their own activity only, and on Linux attach a
classic BPF ident filter to each raw socket so other flows' packets are
dropped in the kernel instead of waking every flow.
2026-07-27 23:11:48 +08:00
..
cmsg_unix.go Add ping client 2025-08-23 16:16:28 +08:00
cmsg_windows.go ping: Add comments 2025-08-25 10:18:22 +08:00
destination.go ping: Fix stale flows kept alive by unrelated ICMP traffic 2026-07-27 23:11:48 +08:00
destination_test.go ping: Fix stale flows kept alive by unrelated ICMP traffic 2026-07-27 23:11:48 +08:00
filter_linux.go ping: Fix stale flows kept alive by unrelated ICMP traffic 2026-07-27 23:11:48 +08:00
filter_other.go ping: Fix stale flows kept alive by unrelated ICMP traffic 2026-07-27 23:11:48 +08:00
ping.go Make gtcpip public for external use 2026-07-27 23:11:48 +08:00
ping_test.go Make gtcpip public for external use 2026-07-27 23:11:48 +08:00
port.go Add flow dispatcher 2026-07-27 23:11:48 +08:00
socket_linux_unprivileged.go Make gtcpip public for external use 2026-07-27 23:11:48 +08:00
socket_unix.go ping: Fix missing TTL and ICMP error handling 2026-07-27 23:11:48 +08:00
socket_windows.go ping: Fix missing TTL and ICMP error handling 2026-07-27 23:11:48 +08:00