From d2dd40aae22ff1500be0616e36bfea035750ed92 Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Thu, 28 Nov 2013 17:03:51 +0000 Subject: [PATCH] fix tor range. add :: to make sure it is parsed as v6. --- addrmanager.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addrmanager.go b/addrmanager.go index ab1fc04b..4febb107 100644 --- a/addrmanager.go +++ b/addrmanager.go @@ -1061,7 +1061,7 @@ func RFC6145(na *btcwire.NetAddress) bool { return rfc6145.Contains(na.IP) } -var onioncatrange = net.IPNet{IP: net.ParseIP("FD87:d87e:eb43"), +var onioncatrange = net.IPNet{IP: net.ParseIP("FD87:d87e:eb43::"), Mask: net.CIDRMask(48, 128)} func Tor(na *btcwire.NetAddress) bool { @@ -1073,9 +1073,6 @@ func Tor(na *btcwire.NetAddress) bool { // RFC4193 Unique local IPv6 range. // In summary the format is: // { magic 6 bytes, 10 bytes base32 decode of key hash } - // TODO(oga) note that when handling tor addresses we need to detect - // this and // connect correctly. We may want to print tor addresses - // specially too. return onioncatrange.Contains(na.IP) }