From: Remi Gacogne Date: Tue, 13 May 2025 07:20:22 +0000 (+0200) Subject: dnsdist: Fix a crash in the TCP concurrent connections map X-Git-Tag: dnsdist-2.0.0-alpha2~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15554%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Fix a crash in the TCP concurrent connections map The bug was introduced in 99d1e8f044d43b9a75ffc70fed22ea674a9b7859. Thanks to Robert Edmonds for finding, reporting and proposing a patch fixing the issue! --- diff --git a/pdns/dnsdistdist/dnsdist-concurrent-connections.cc b/pdns/dnsdistdist/dnsdist-concurrent-connections.cc index c2f2c64657..8669fb6eb8 100644 --- a/pdns/dnsdistdist/dnsdist-concurrent-connections.cc +++ b/pdns/dnsdistdist/dnsdist-concurrent-connections.cc @@ -71,7 +71,7 @@ using map_t = boost::multi_index_container< boost::multi_index::ordered_non_unique, boost::multi_index::member>>>; -static std::vector> s_tcpClientsConnectionMetrics{10}; +static std::vector> s_tcpClientsConnectionMetrics{NB_SHARDS}; static AddressAndPortRange getRange(const ComboAddress& from) {