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-lua-bindings-packetcache.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-lua-bindings-packetcache.cc')
-rw-r--r-- | dnsdist-lua-bindings-packetcache.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dnsdist-lua-bindings-packetcache.cc b/dnsdist-lua-bindings-packetcache.cc index fd62eb5..f71bf37 100644 --- a/dnsdist-lua-bindings-packetcache.cc +++ b/dnsdist-lua-bindings-packetcache.cc @@ -41,6 +41,7 @@ void setupLuaBindingsPacketCache(LuaContext& luaCtx, bool client) size_t maxNegativeTTL = 3600; size_t staleTTL = 60; size_t numberOfShards = 20; + size_t maxEntrySize{0}; bool dontAge = false; bool deferrableInsertLock = true; bool ecsParsing = false; @@ -59,6 +60,7 @@ void setupLuaBindingsPacketCache(LuaContext& luaCtx, bool client) getOptionalValue<size_t>(vars, "staleTTL", staleTTL); getOptionalValue<size_t>(vars, "temporaryFailureTTL", tempFailTTL); getOptionalValue<bool>(vars, "cookieHashing", cookieHashing); + getOptionalValue<size_t>(vars, "maximumEntrySize", maxEntrySize); if (getOptionalValue<decltype(skipOptions)>(vars, "skipOptions", skipOptions) > 0) { for (const auto& option : skipOptions) { @@ -87,6 +89,9 @@ void setupLuaBindingsPacketCache(LuaContext& luaCtx, bool client) res->setKeepStaleData(keepStaleData); res->setSkippedOptions(optionsToSkip); + if (maxEntrySize >= sizeof(dnsheader)) { + res->setMaximumEntrySize(maxEntrySize); + } return res; }); |