Deprecate DNS_PORT as configureable in INI now. Reduce confusion as it would change DNSc port too and I believe it was meant only to change DNSd port.

pull/54/head
Ryan Tharp 6 years ago
parent 4127c9bea5
commit f03c41a99f

@ -61,9 +61,10 @@ if(STATIC_LINK)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc -static" )
endif()
if(DNS_PORT)
add_definitions(-DDNS_PORT=${DNS_PORT})
endif()
# This is now configurable in ini
#if(DNS_PORT)
# add_definitions(-DDNS_PORT=${DNS_PORT})
#endif()
if(SHADOW)
set(WITH_STATIC OFF)

@ -9,10 +9,6 @@
#include <netdb.h>
#endif
#ifndef DNS_PORT
#define DNS_PORT (53)
#endif
namespace llarp
{
namespace handlers
@ -48,7 +44,7 @@ namespace llarp
if(k == "local-dns")
{
std::string resolverAddr = v;
uint16_t dnsport = DNS_PORT;
uint16_t dnsport = 53;
auto pos = v.find(":");
if(pos != std::string::npos)
{
@ -61,7 +57,7 @@ namespace llarp
if(k == "upstream-dns")
{
std::string resolverAddr = v;
uint16_t dnsport = DNS_PORT;
uint16_t dnsport = 53;
auto pos = v.find(":");
if(pos != std::string::npos)
{
@ -392,7 +388,7 @@ namespace llarp
{
// not found
service::Address addr;
llarp::LogWarn(ip, " not found in tun map. Sending ", addr.ToString());
llarp::LogWarn(ip, " not found in tun map.");
return addr;
}
// found

Loading…
Cancel
Save