View | Details | Raw Unified | Return to bug 1277 | Differences between
and this patch

Collapse All | Expand All

(-)b/doc/unbound.conf.5.in (-4 / +4 lines)
 Lines 1197-1216   This can make ordinary queries complete (if repeatedly queried for), Link Here 
1197
and enter the cache, whilst also mitigating the traffic flow by the
1197
and enter the cache, whilst also mitigating the traffic flow by the
1198
factor given.
1198
factor given.
1199
.TP 5
1199
.TP 5
1200
.B ratelimit\-for\-domain: \fI<domain> <number qps>
1200
.B ratelimit\-for\-domain: \fI<domain> <number qps or 0>
1201
Override the global ratelimit for an exact match domain name with the listed
1201
Override the global ratelimit for an exact match domain name with the listed
1202
number.  You can give this for any number of names.  For example, for
1202
number.  You can give this for any number of names.  For example, for
1203
a top\-level\-domain you may want to have a higher limit than other names.
1203
a top\-level\-domain you may want to have a higher limit than other names.
1204
A value of \-1 will disable ratelimiting for that domain.
1204
A value of 0 will disable ratelimiting for that domain.
1205
.TP 5
1205
.TP 5
1206
.B ratelimit\-below\-domain: \fI<domain> <number qps>
1206
.B ratelimit\-below\-domain: \fI<domain> <number qps or 0>
1207
Override the global ratelimit for a domain name that ends in this name.
1207
Override the global ratelimit for a domain name that ends in this name.
1208
You can give this multiple times, it then describes different settings
1208
You can give this multiple times, it then describes different settings
1209
in different parts of the namespace.  The closest matching suffix is used
1209
in different parts of the namespace.  The closest matching suffix is used
1210
to determine the qps limit.  The rate for the exact matching domain name
1210
to determine the qps limit.  The rate for the exact matching domain name
1211
is not changed, use ratelimit\-for\-domain to set that, you might want
1211
is not changed, use ratelimit\-for\-domain to set that, you might want
1212
to use different settings for a top\-level\-domain and subdomains.
1212
to use different settings for a top\-level\-domain and subdomains.
1213
A value of \-1 will disable ratelimiting for domain names that end in this name.
1213
A value of 0 will disable ratelimiting for domain names that end in this name.
1214
.TP 5
1214
.TP 5
1215
.B ip\-ratelimit: \fI<number or 0>
1215
.B ip\-ratelimit: \fI<number or 0>
1216
Enable global ratelimiting of queries accepted per ip address.
1216
Enable global ratelimiting of queries accepted per ip address.
(-)b/services/cache/infra.c (-1 / +3 lines)
 Lines 893-899   int infra_ratelimit_inc(struct infra_cache* infra, uint8_t* name, Link Here 
893
893
894
	/* find ratelimit */
894
	/* find ratelimit */
895
	lim = infra_find_ratelimit(infra, name, namelen);
895
	lim = infra_find_ratelimit(infra, name, namelen);
896
	
896
	if(!lim)
897
		return 1;
898
897
	/* find or insert ratedata */
899
	/* find or insert ratedata */
898
	entry = infra_find_ratedata(infra, name, namelen, 1);
900
	entry = infra_find_ratedata(infra, name, namelen, 1);
899
	if(entry) {
901
	if(entry) {

Return to bug 1277