diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 21:14:48 +0000 |
commit | e10ff189aca57bba91933088195d4edda199cb20 (patch) | |
tree | 056237559582eba27e68fa864434436ac5b7f535 /dnsdist-rings.cc | |
parent | Adding upstream version 1.8.3. (diff) | |
download | dnsdist-e10ff189aca57bba91933088195d4edda199cb20.tar.xz dnsdist-e10ff189aca57bba91933088195d4edda199cb20.zip |
Adding upstream version 1.9.3.upstream/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; +} |