if (ATOMIC_GET(ctx->badcookie_ctr) > BADCOOKIE_CTR_INIT) {
// Silently drop the response.
update_ctr(ctx);
+ knotd_mod_stats_incr(mod, qdata->params->thread_id, 1, 0, 1);
return KNOTD_STATE_NOOP;
} else {
if (ctx->badcookie_slip > 1) {
return ret;
}
+ ret = knotd_mod_stats_add(mod, "dropped", 1, NULL);
+ if (ret != KNOT_EOK) {
+ free(ctx);
+ return ret;
+ }
+
// Store module context before rollover thread is created.
knotd_mod_ctx_set(mod, ctx);
support DNS Cookies, otherwise they are not used.
.. NOTE::
- This module introduces a statistics counter: the number of queries
- containing the COOKIE option.
+ This module introduces two statistics counters:
+
+ - ``presence`` – The number of queries containing the COOKIE option.
+ - ``dropped`` – The number of dropped queries due to the slip limit.
.. WARNING::
For effective module operation the :ref:`RRL<mod-rrl>` module must also