mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 03:02:37 +02:00
Merge #18023: Fix some asmap issues
c86bc14408Make asmap Interpret tolerant of malicious map data (Pieter Wuille)38c2395d7aUse ASNs for mapped IPv4 addresses correctly (Pieter Wuille)6f8c937312Mark asmap const in statistics code (Pieter Wuille)d58bcdc4b5Avoid asmap copies in initialization (Pieter Wuille) Pull request description: Here are a few things to improve in the asmap implementation. The first two commits are just code improvements. The last one is a bugfix (the exsting code wouldn't correctly apply ASN lookups to mapped/embedded IPv4 addresses). ACKs for top commit: practicalswift: ACKc86bc14408-- patch looks correct naumenkogs: utACKc86bc14laanwj: ACKc86bc14408jonatack: ACKc86bc14408code looks correct, built/ran tests, bitcoind with -asmap pointed to asmap/demo.map Tree-SHA512: 1036f43152754d621bfbecfd3b7c7276e4670598fcaed42a3d275e51fa2cf3653e2c9e9cfa714f6c7719362541510e92171e076ac4169b55a0cc8908b2d514c0
This commit is contained in:
@@ -79,6 +79,11 @@ class CNetAddr
|
||||
bool GetInAddr(struct in_addr* pipv4Addr) const;
|
||||
uint32_t GetNetClass() const;
|
||||
|
||||
//! For IPv4, mapped IPv4, SIIT translated IPv4, Teredo, 6to4 tunneled addresses, return the relevant IPv4 address as a uint32.
|
||||
uint32_t GetLinkedIPv4() const;
|
||||
//! Whether this address has a linked IPv4 address (see GetLinkedIPv4()).
|
||||
bool HasLinkedIPv4() const;
|
||||
|
||||
// The AS on the BGP path to the node we use to diversify
|
||||
// peers in AddrMan bucketing based on the AS infrastructure.
|
||||
// The ip->AS mapping depends on how asmap is constructed.
|
||||
|
||||
Reference in New Issue
Block a user