[ratelimits] default responses-per-second
Tony Finch
dot at dotat.at
Fri Nov 2 14:45:30 UTC 2012
I just upgraded to the latest version of the patch. I noticed that it no
longer requires that responses-per-second is specified, and the default
value is a bit weird. Does it need this correction?
diff --git a/bin/named/server.c b/bin/named/server.c
index 6d075e7..c6dc709 100644
--- a/bin/named/server.c
+++ b/bin/named/server.c
@@ -1599,20 +1599,21 @@ configure_rrl(dns_view_t *view, const cfg_obj_t *config, const cfg_obj_t *map) {
i = ISC_MAX(10000, min_entries);
obj = NULL;
result = cfg_map_get(map, "max-table-size", &obj);
if (result == ISC_R_SUCCESS) {
i = cfg_obj_asuint32(obj);
CHECK_RRL(obj, i >= min_entries,
"invalid '{max-table-size %d;}'", i);
}
rrl->max_entries = i;
+ i = 0;
obj = NULL;
result = cfg_map_get(map, "responses-per-second", &obj);
if (result == ISC_R_SUCCESS) {
i = cfg_obj_asuint32(obj);
CHECK_RRL(obj, i <= DNS_RRL_MAX_RATE,
"invalid '{responses-per-second %d;}'", i);
}
rrl->responses_per_second = i;
rrl->scaled_responses_per_second = rrl->responses_per_second;
Tony.
--
f.anthony.n.finch <dot at dotat.at> http://dotat.at/
Forties, Cromarty: East, veering southeast, 4 or 5, occasionally 6 at first.
Rough, becoming slight or moderate. Showers, rain at first. Moderate or good,
occasionally poor at first.
More information about the ratelimits
mailing list