summaryrefslogtreecommitdiffstats
path: root/daemon/ratelimiting.c
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2024-12-18 12:01:10 +0100
committerVladimír Čunát <vladimir.cunat@nic.cz>2025-01-20 09:16:32 +0100
commit96599df7daa62db2361ff8e8097730284832ba0b (patch)
tree739e7fd4ef312753d693bed58a9ef6e11a3e233d /daemon/ratelimiting.c
parentMerge !1646: views: allow overriding price-factor (diff)
downloadknot-resolver-96599df7daa62db2361ff8e8097730284832ba0b.tar.xz
knot-resolver-96599df7daa62db2361ff8e8097730284832ba0b.zip
kr_request: add a .ratelimited flag
This makes it simpler for other parts of resolver to react to this situation, e.g. custom modules pushing the information to analytics.
Diffstat (limited to 'daemon/ratelimiting.c')
-rw-r--r--daemon/ratelimiting.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon/ratelimiting.c b/daemon/ratelimiting.c
index 996beaaf..d182658e 100644
--- a/daemon/ratelimiting.c
+++ b/daemon/ratelimiting.c
@@ -189,6 +189,7 @@ bool ratelimiting_request_begin(struct kr_request *req)
}
}
+ req->ratelimited = true; // we set this even on dry_run
if (ratelimiting->dry_run) return false;
// perform limiting