diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2016-04-21 13:46:36 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2016-04-21 13:48:13 +0200 |
commit | 7daa3adb242d9c8728fdb15c6af6596aaad5502f (patch) | |
tree | c8ab96faa549fd7ce0033de2bf2b8e4a4e7d5b70 /src/init.cpp | |
parent | 04a29373571d44be36bd099c3b3ec3cda89e99d1 (diff) | |
parent | d39f5b425d8fc1bf3b7f33d35625ffd8d7a3cd77 (diff) |
Merge #7868: net: Split DNS resolving functionality out of net structures
d39f5b4 net: disable resolving from storage structures (Cory Fields)
3675699 net: resolve outside of storage structures (Cory Fields)
a98cd1f net: manually resolve dns seed sources (Cory Fields)
e9fc71e net: require lookup functions to specify all arguments (Cory Fields)
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index 038b28cc3a..b06f448a00 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1138,10 +1138,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) if (mapArgs.count("-externalip")) { BOOST_FOREACH(const std::string& strAddr, mapMultiArgs["-externalip"]) { - CService addrLocal(strAddr, GetListenPort(), fNameLookup); - if (!addrLocal.IsValid()) + CService addrLocal; + if (Lookup(strAddr.c_str(), addrLocal, GetListenPort(), fNameLookup) && addrLocal.IsValid()) + AddLocal(addrLocal, LOCAL_MANUAL); + else return InitError(ResolveErrMsg("externalip", strAddr)); - AddLocal(CService(strAddr, GetListenPort(), fNameLookup), LOCAL_MANUAL); } } |