diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:49 +0000 |
commit | 2f230033794fafdf10822568e763d4db68cf6c6b (patch) | |
tree | 39ca5c2325b7b43c9a28ca6d4ad4026a61e7eb97 /dnsdist-discovery.cc | |
parent | Adding debian version 1.8.3-3. (diff) | |
download | dnsdist-2f230033794fafdf10822568e763d4db68cf6c6b.tar.xz dnsdist-2f230033794fafdf10822568e763d4db68cf6c6b.zip |
Merging upstream version 1.9.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | dnsdist-discovery.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dnsdist-discovery.cc b/dnsdist-discovery.cc index 76042e3..bba713b 100644 --- a/dnsdist-discovery.cc +++ b/dnsdist-discovery.cc @@ -38,7 +38,7 @@ const uint16_t ServiceDiscovery::s_defaultDoHSVCKey{7}; bool ServiceDiscovery::addUpgradeableServer(std::shared_ptr<DownstreamState>& server, uint32_t interval, std::string poolAfterUpgrade, uint16_t dohSVCKey, bool keepAfterUpgrade) { - s_upgradeableBackends.lock()->push_back(std::make_shared<UpgradeableBackend>(UpgradeableBackend{server, poolAfterUpgrade, 0, interval, dohSVCKey, keepAfterUpgrade})); + s_upgradeableBackends.lock()->push_back(std::make_shared<UpgradeableBackend>(UpgradeableBackend{server, std::move(poolAfterUpgrade), 0, interval, dohSVCKey, keepAfterUpgrade})); return true; } @@ -52,7 +52,7 @@ struct DesignatedResolvers static bool parseSVCParams(const PacketBuffer& answer, std::map<uint16_t, DesignatedResolvers>& resolvers) { std::map<DNSName, std::vector<ComboAddress>> hints; - const struct dnsheader* dh = reinterpret_cast<const struct dnsheader*>(answer.data()); + const dnsheader_aligned dh(answer.data()); PacketReader pr(std::string_view(reinterpret_cast<const char*>(answer.data()), answer.size())); uint16_t qdcount = ntohs(dh->qdcount); uint16_t ancount = ntohs(dh->ancount); @@ -226,7 +226,7 @@ static bool handleSVCResult(const PacketBuffer& answer, const ComboAddress& exis tempConfig.d_subjectName = resolver.target.toStringNoDot(); tempConfig.d_addr.sin4.sin_port = tempConfig.d_port; - config = tempConfig; + config = std::move(tempConfig); return true; } |