From: Adam Majer Date: Fri, 24 Feb 2023 15:46:23 +0000 (+0100) Subject: dnsdist-protobuf: fix compilation with DoH disabled X-Git-Tag: dnsdist-1.8.0-rc2~11^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f80f6263ee32f73f996e6b6b600e2d7d9ca5b3d;p=thirdparty%2Fpdns.git dnsdist-protobuf: fix compilation with DoH disabled --- diff --git a/pdns/dnsdist-protobuf.cc b/pdns/dnsdist-protobuf.cc index 3eb5b82d92..a2d24622fc 100644 --- a/pdns/dnsdist-protobuf.cc +++ b/pdns/dnsdist-protobuf.cc @@ -266,6 +266,7 @@ const ProtoBufMetaKey::TypeContainer ProtoBufMetaKey::s_types = { ProtoBufMetaKey::KeyTypeDescription{ "sni", Type::SNI, [](const DNSQuestion& dq, const std::string&, uint8_t) -> std::vector { return {dq.sni}; }, false }, ProtoBufMetaKey::KeyTypeDescription{ "pool", Type::Pool, [](const DNSQuestion& dq, const std::string&, uint8_t) -> std::vector { return {dq.ids.poolName}; }, false }, ProtoBufMetaKey::KeyTypeDescription{ "b64-content", Type::B64Content, [](const DNSQuestion& dq, const std::string&, uint8_t) -> std::vector { const auto& data = dq.getData(); return {Base64Encode(std::string(data.begin(), data.end()))}; }, false }, +#ifdef HAVE_DNS_OVER_HTTPS ProtoBufMetaKey::KeyTypeDescription{ "doh-header", Type::DoHHeader, [](const DNSQuestion& dq , const std::string& name, uint8_t) -> std::vector { if (!dq.ids.du) { return {}; @@ -301,6 +302,7 @@ const ProtoBufMetaKey::TypeContainer ProtoBufMetaKey::s_types = { } return {}; }, false, false }, +#endif // HAVE_DNS_OVER_HTTPS ProtoBufMetaKey::KeyTypeDescription{ "proxy-protocol-value", Type::ProxyProtocolValue, [](const DNSQuestion& dq, const std::string&, uint8_t numericSubKey) -> std::vector { if (!dq.proxyProtocolValues) { return {};