diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:22:53 +0200 |
---|---|---|
committer | Michael Stapelberg <stapelberg@debian.org> | 2014-06-19 09:22:53 +0200 |
commit | 8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 (patch) | |
tree | 4449f2036cccf162e8417cc5841a35815b3e7ac5 /src/pkg/net/ip.go | |
parent | c8bf49ef8a92e2337b69c14b9b88396efe498600 (diff) | |
download | golang-upstream/1.3.tar.gz |
Imported Upstream version 1.3upstream/1.3
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 } |