aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-04-12 20:48:29 -0400
committerCory Fields <cory-nospam-@coryfields.com>2016-04-20 13:08:19 -0400
commitd39f5b425d8fc1bf3b7f33d35625ffd8d7a3cd77 (patch)
tree915b34e43de28e551052fd08f66fa76ee5912171 /src/netbase.cpp
parent367569926a9b15c05ba8d56c554880b8f5614f71 (diff)
downloadbitcoin-d39f5b425d8fc1bf3b7f33d35625ffd8d7a3cd77.tar.xz
net: disable resolving from storage structures
CNetAddr/CService/CSubnet can no longer resolve DNS.
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 1855d0a2e8..b44a8b16e2 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -688,19 +688,19 @@ CNetAddr::CNetAddr(const struct in6_addr& ipv6Addr, const uint32_t scope)
scopeId = scope;
}
-CNetAddr::CNetAddr(const char *pszIp, bool fAllowLookup)
+CNetAddr::CNetAddr(const char *pszIp)
{
Init();
std::vector<CNetAddr> vIP;
- if (LookupHost(pszIp, vIP, 1, fAllowLookup))
+ if (LookupHost(pszIp, vIP, 1, false))
*this = vIP[0];
}
-CNetAddr::CNetAddr(const std::string &strIp, bool fAllowLookup)
+CNetAddr::CNetAddr(const std::string &strIp)
{
Init();
std::vector<CNetAddr> vIP;
- if (LookupHost(strIp.c_str(), vIP, 1, fAllowLookup))
+ if (LookupHost(strIp.c_str(), vIP, 1, false))
*this = vIP[0];
}
@@ -1123,35 +1123,35 @@ bool CService::SetSockAddr(const struct sockaddr *paddr)
}
}
-CService::CService(const char *pszIpPort, bool fAllowLookup)
+CService::CService(const char *pszIpPort)
{
Init();
CService ip;
- if (Lookup(pszIpPort, ip, 0, fAllowLookup))
+ if (Lookup(pszIpPort, ip, 0, false))
*this = ip;
}
-CService::CService(const char *pszIpPort, int portDefault, bool fAllowLookup)
+CService::CService(const char *pszIpPort, int portDefault)
{
Init();
CService ip;
- if (Lookup(pszIpPort, ip, portDefault, fAllowLookup))
+ if (Lookup(pszIpPort, ip, portDefault, false))
*this = ip;
}
-CService::CService(const std::string &strIpPort, bool fAllowLookup)
+CService::CService(const std::string &strIpPort)
{
Init();
CService ip;
- if (Lookup(strIpPort.c_str(), ip, 0, fAllowLookup))
+ if (Lookup(strIpPort.c_str(), ip, 0, false))
*this = ip;
}
-CService::CService(const std::string &strIpPort, int portDefault, bool fAllowLookup)
+CService::CService(const std::string &strIpPort, int portDefault)
{
Init();
CService ip;
- if (Lookup(strIpPort.c_str(), ip, portDefault, fAllowLookup))
+ if (Lookup(strIpPort.c_str(), ip, portDefault, false))
*this = ip;
}
@@ -1245,7 +1245,7 @@ CSubNet::CSubNet():
memset(netmask, 0, sizeof(netmask));
}
-CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
+CSubNet::CSubNet(const std::string &strSubnet)
{
size_t slash = strSubnet.find_last_of('/');
std::vector<CNetAddr> vIP;
@@ -1255,7 +1255,7 @@ CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
memset(netmask, 255, sizeof(netmask));
std::string strAddress = strSubnet.substr(0, slash);
- if (LookupHost(strAddress.c_str(), vIP, 1, fAllowLookup))
+ if (LookupHost(strAddress.c_str(), vIP, 1, false))
{
network = vIP[0];
if (slash != strSubnet.npos)