diff options
Diffstat (limited to 'src/pkg/net/ip.go')
-rw-r--r-- | src/pkg/net/ip.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/net/ip.go b/src/pkg/net/ip.go index fd6a7d4ee..0582009b8 100644 --- a/src/pkg/net/ip.go +++ b/src/pkg/net/ip.go @@ -623,6 +623,9 @@ func parseIPv6(s string, zoneAllowed bool) (ip IP, zone string) { for k := ellipsis + n - 1; k >= ellipsis; k-- { ip[k] = 0 } + } else if ellipsis >= 0 { + // Ellipsis must represent at least one 0 group. + return nil, zone } return ip, zone } |