diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-04-12 20:38:06 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2016-04-20 13:07:19 -0400 |
commit | a98cd1fc86eac1e5e5a09830028233dbce1dae70 (patch) | |
tree | 42c2b46fc37e2d960b1a218a282890ac2b8cbcc8 /src/net.cpp | |
parent | e9fc71e5fa6f0d7991bac616b9fed6a80e77a8d7 (diff) |
net: manually resolve dns seed sources
Note: Some seeds aren't actually returning an IP for their name entries, so
they're being added to addrman with a source of [::].
This commit shouldn't change that behavior, for better or worse.
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index 6ab6ef819d..7dec8fc1cf 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1454,7 +1454,15 @@ void ThreadDNSAddressSeed() found++; } } - addrman.Add(vAdd, CNetAddr(seed.name, true)); + // TODO: The seed name resolve may fail, yielding an IP of [::], which results in + // addrman assigning the same source to results from different seeds. + // This should switch to a hard-coded stable dummy IP for each seed name, so that the + // resolve is not required at all. + if (!vIPs.empty()) { + CService seedSource; + Lookup(seed.name.c_str(), seedSource, 0, true); + addrman.Add(vAdd, seedSource); + } } } |