You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/SOURCES/default-upstream-dns.patch

24 lines
920 B
Diff

commit 73f0432b2873d3af91a0c8cf2dd107463318b9d9
Author: Jason Rhinelander <jason@imaginary.ca>
Date: Wed Aug 11 18:24:11 2021 -0300
Fix default upstream DNS not working
The default upstream DNS was being set to 1.1.1.1:0, which doesn't work.
This fixes it to also set the port so that default upstream resolution
(i.e. with an empty config) works again.
diff --git a/llarp/config/config.cpp b/llarp/config/config.cpp
index bef3e521f..721a479df 100644
--- a/llarp/config/config.cpp
+++ b/llarp/config/config.cpp
@@ -711,6 +711,8 @@ namespace llarp
// Default, but if we get any upstream (including upstream=, i.e. empty string) we clear it
constexpr Default DefaultUpstreamDNS{"1.1.1.1"};
m_upstreamDNS.emplace_back(DefaultUpstreamDNS.val);
+ if (!m_upstreamDNS.back().getPort())
+ m_upstreamDNS.back().setPort(53);
conf.defineOption<std::string>(
"dns",