(t *testing.T)
| 22 | ) |
| 23 | |
| 24 | func mustBeRoot(t *testing.T) { |
| 25 | t.Helper() |
| 26 | // iptables listing requires root on this system. |
| 27 | if err := exec.Command("iptables", "-t", "mangle", "-L", "-n").Run(); err != nil { |
| 28 | t.Skipf("skipping: no root / iptables: %v", err) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // safeScope uses a deliberately unused IP+port so installed rules can't |
| 33 | // interfere with real traffic. 198.51.100.0/24 is TEST-NET-2 (RFC 5737). |
no test coverage detected