portlist: filter out all of 127.0.0.0/8, not just 127.0.0.1/32

Per user private bug report.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-04-12 09:17:03 -07:00
parent f325aa7e38
commit e619296ece
2 changed files with 3 additions and 3 deletions

View File

@@ -42,8 +42,7 @@ func parsePort(s string) int {
}
func isLoopbackAddr(s string) bool {
return strings.HasPrefix(s, "127.0.0.1:") ||
strings.HasPrefix(s, "127.0.0.1.") ||
return strings.HasPrefix(s, "127.") ||
strings.HasPrefix(s, "[::1]:") ||
strings.HasPrefix(s, "::1.")
}