summaryrefslogtreecommitdiff
path: root/src/pkg/net/ip.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/net/ip.go')
-rw-r--r--src/pkg/net/ip.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/net/ip.go b/src/pkg/net/ip.go
index 12bb6f351..61b2c687e 100644
--- a/src/pkg/net/ip.go
+++ b/src/pkg/net/ip.go
@@ -75,7 +75,8 @@ var (
// Well-known IPv6 addresses
var (
- IPzero = make(IP, IPv6len) // all zeros
+ IPzero = make(IP, IPv6len) // all zeros
+ IPv6loopback = IP([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1})
)
// Is p all zeros?
@@ -436,7 +437,7 @@ func parseIPv6(s string) IP {
}
// Otherwise must be followed by colon and more.
- if s[i] != ':' && i+1 == len(s) {
+ if s[i] != ':' || i+1 == len(s) {
return nil
}
i++