-
Notifications
You must be signed in to change notification settings - Fork 55
addrv2: crash due to 0.9.85.249 #383
Copy link
Copy link
Closed
Labels
Description
Addrv2 parse failed
Module: Rustbitcoin
Result: clearnet=1tor=0cjdns=0i2p=0
Module: Bitcoin
Result: clearnet=0tor=0cjdns=0i2p=0The address that pointed this discrepancy is 0.9.85.249 which Bitcoin Core doesn't accept it because it is a local address. rust-bitcoin successfully parsed and accepted it. See:
bool CNetAddr::IsLocal() const
{
// IPv4 loopback (127.0.0.0/8 or 0.0.0.0/8)
if (IsIPv4() && (m_addr[0] == 127 || m_addr[0] == 0)) {
return true;
}
// IPv6 loopback (::1/128)
static const unsigned char pchLocal[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1};
if (IsIPv6() && memcmp(m_addr.data(), pchLocal, sizeof(pchLocal)) == 0) {
return true;
}
return false;
}Reactions are currently unavailable