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. |
||
|---|---|---|
| .. | ||
| cmsg_unix.go | ||
| cmsg_windows.go | ||
| destination.go | ||
| destination_test.go | ||
| filter_linux.go | ||
| filter_other.go | ||
| ping.go | ||
| ping_test.go | ||
| port.go | ||
| socket_linux_unprivileged.go | ||
| socket_unix.go | ||
| socket_windows.go | ||