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-rings.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-rings.cc')
-rw-r--r-- | dnsdist-rings.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dnsdist-rings.cc b/dnsdist-rings.cc index 5485b33..b97b44e 100644 --- a/dnsdist-rings.cc +++ b/dnsdist-rings.cc @@ -214,3 +214,12 @@ size_t Rings::loadFromFile(const std::string& filepath, const struct timespec& n return inserted; } + +bool Rings::Response::isACacheHit() const +{ + bool hit = ds.sin4.sin_family == 0; + if (!hit && ds.isIPv4() && ds.sin4.sin_addr.s_addr == 0 && ds.sin4.sin_port == 0) { + hit = true; + } + return hit; +} |