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-proxy-protocol.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 'dnsdist-proxy-protocol.cc')
-rw-r--r-- | dnsdist-proxy-protocol.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dnsdist-proxy-protocol.cc b/dnsdist-proxy-protocol.cc index aefcafb..d19e872 100644 --- a/dnsdist-proxy-protocol.cc +++ b/dnsdist-proxy-protocol.cc @@ -21,6 +21,7 @@ */ #include "dnsdist-proxy-protocol.hh" +#include "dnsdist-metrics.hh" #include "dolog.hh" NetmaskGroup g_proxyProtocolACL; @@ -81,13 +82,13 @@ bool handleProxyProtocol(const ComboAddress& remote, bool isTCP, const NetmaskGr ssize_t used = parseProxyHeader(query, proxyProto, realRemote, realDestination, tcp, values); if (used <= 0) { - ++g_stats.proxyProtocolInvalid; + ++dnsdist::metrics::g_stats.proxyProtocolInvalid; vinfolog("Ignoring invalid proxy protocol (%d, %d) query over %s from %s", query.size(), used, (isTCP ? "TCP" : "UDP"), remote.toStringWithPort()); return false; } else if (static_cast<size_t>(used) > g_proxyProtocolMaximumSize) { vinfolog("Proxy protocol header in %s packet from %s is larger than proxy-protocol-maximum-size (%d), dropping", (isTCP ? "TCP" : "UDP"), remote.toStringWithPort(), used); - ++g_stats.proxyProtocolInvalid; + ++dnsdist::metrics::g_stats.proxyProtocolInvalid; return false; } @@ -95,14 +96,14 @@ bool handleProxyProtocol(const ComboAddress& remote, bool isTCP, const NetmaskGr /* on TCP we have not read the actual query yet */ if (!isTCP && query.size() < sizeof(struct dnsheader)) { - ++g_stats.nonCompliantQueries; + ++dnsdist::metrics::g_stats.nonCompliantQueries; return false; } if (proxyProto && g_applyACLToProxiedClients) { if (!acl.match(realRemote)) { vinfolog("Query from %s dropped because of ACL", realRemote.toStringWithPort()); - ++g_stats.aclDrops; + ++dnsdist::metrics::g_stats.aclDrops; return false; } } |