From 9a9538bf300265605cfffa4c140629aa729e9699 Mon Sep 17 00:00:00 2001 From: Jeff Date: Fri, 7 Dec 2018 15:56:01 -0500 Subject: [PATCH] send dns reply if we have a path already --- llarp/handlers/tun.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/llarp/handlers/tun.cpp b/llarp/handlers/tun.cpp index 3980da467..37de0b007 100644 --- a/llarp/handlers/tun.cpp +++ b/llarp/handlers/tun.cpp @@ -191,7 +191,13 @@ namespace llarp if(addr.FromString(qname, ".loki")) { - return EnsurePathToService( + if(HasPathToService(addr)) + { + huint32_t ip = ObtainIPForAddr(addr.data(), true); + msg.AddINReply(ip); + } + else + return EnsurePathToService( addr, std::bind(&TunEndpoint::SendDNSReply, this, std::placeholders::_1, std::placeholders::_2, msg, reply),