From 6f9aada482071e825ce6027a7bbe422f043fc543 Mon Sep 17 00:00:00 2001 From: David Hill Date: Wed, 2 Oct 2013 17:31:44 -0400 Subject: [PATCH] RFC4193 is fc00::/7, not fc00::/15. Also fix two typos in RFC4843() and RFC6052 --- addrmanager.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addrmanager.go b/addrmanager.go index 38a4956f..cabe0e2f 100644 --- a/addrmanager.go +++ b/addrmanager.go @@ -497,7 +497,7 @@ func (a *AddrManager) loadPeers() { return } log.Infof("[AMGR] Successfuly loaded %d addresses from %s", - a.nNew + a.nTried, filePath) + a.nNew+a.nTried, filePath) } func (a *AddrManager) deserialisePeers(filePath string) error { @@ -1016,9 +1016,9 @@ func RFC3964(na *btcwire.NetAddress) bool { return rfc3964.Contains(na.IP) } -// RFC4193 IPv6 unique local (FC00::/15) +// RFC4193 IPv6 unique local (FC00::/7) var rfc4193 = net.IPNet{IP: net.ParseIP("FC00::"), - Mask: net.CIDRMask(15, 128)} + Mask: net.CIDRMask(7, 128)} func RFC4193(na *btcwire.NetAddress) bool { return rfc4193.Contains(na.IP) @@ -1033,7 +1033,7 @@ func RFC4380(na *btcwire.NetAddress) bool { } // RFC4843 IPv6 ORCHID: (2001:10::/28) -var rfc4843 = net.IPNet{IP: net.ParseIP("2001;10::"), +var rfc4843 = net.IPNet{IP: net.ParseIP("2001:10::"), Mask: net.CIDRMask(28, 128)} func RFC4843(na *btcwire.NetAddress) bool { @@ -1049,7 +1049,7 @@ func RFC4862(na *btcwire.NetAddress) bool { } // RFC6052: IPv6 well known prefix (64:FF9B::/96) -var rfc6052 = net.IPNet{IP: net.ParseIP("64::FF9B::"), +var rfc6052 = net.IPNet{IP: net.ParseIP("64:FF9B::"), Mask: net.CIDRMask(96, 128)} func RFC6052(na *btcwire.NetAddress) bool {