TestGetInterfaceByIP_LinkLocalIPv6 verifies that IPv6 link-local addresses are filtered out of the cache and therefore never match a lookup.
(t *testing.T)
| 266 | // TestGetInterfaceByIP_LinkLocalIPv6 verifies that IPv6 link-local addresses |
| 267 | // are filtered out of the cache and therefore never match a lookup. |
| 268 | func TestGetInterfaceByIP_LinkLocalIPv6(t *testing.T) { |
| 269 | t.Parallel() |
| 270 | |
| 271 | ip := net.ParseIP("fe80::1") |
| 272 | _, err := GetInterfaceByIP(ip) |
| 273 | if err == nil { |
| 274 | t.Error("expected error for link-local IP fe80::1, got nil") |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | // TestGetInterfaceByIP_LinkLocalIPv4 verifies that IPv4 link-local addresses |
| 279 | // (APIPA range 169.254.x.x) are filtered out of the cache. |
nothing calls this directly
no test coverage detected