mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-05 14:29:37 -05:00
- Fix to return formerr for queries for meta-types, to avoid
packet amplification if this meta-type is sent on to upstream. git-svn-id: file:///svn/unbound/trunk@3978 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
3f7248fa11
commit
5adb2dc4cf
2 changed files with 21 additions and 0 deletions
|
|
@ -860,6 +860,23 @@ worker_handle_request(struct comm_point* c, void* arg, int error,
|
|||
}
|
||||
goto send_reply;
|
||||
}
|
||||
if(qinfo.qtype == LDNS_RR_TYPE_OPT ||
|
||||
qinfo.qtype == LDNS_RR_TYPE_TSIG ||
|
||||
qinfo.qtype == LDNS_RR_TYPE_TKEY ||
|
||||
qinfo.qtype == LDNS_RR_TYPE_MAILA ||
|
||||
qinfo.qtype == LDNS_RR_TYPE_MAILB) {
|
||||
verbose(VERB_ALGO, "worker request: formerror for meta-type.");
|
||||
log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen);
|
||||
sldns_buffer_rewind(c->buffer);
|
||||
LDNS_QR_SET(sldns_buffer_begin(c->buffer));
|
||||
LDNS_RCODE_SET(sldns_buffer_begin(c->buffer),
|
||||
LDNS_RCODE_FORMERR);
|
||||
if(worker->stats.extended) {
|
||||
worker->stats.qtype[qinfo.qtype]++;
|
||||
server_stats_insrcode(&worker->stats, c->buffer);
|
||||
}
|
||||
goto send_reply;
|
||||
}
|
||||
if((ret=parse_edns_from_pkt(c->buffer, &edns, worker->scratchpad)) != 0) {
|
||||
struct edns_data reply_edns;
|
||||
verbose(VERB_ALGO, "worker parse edns: formerror.");
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
5 January 2017: Wouter
|
||||
- Fix to return formerr for queries for meta-types, to avoid
|
||||
packet amplification if this meta-type is sent on to upstream.
|
||||
|
||||
3 January 2017: Wouter
|
||||
- configure --enable-systemd and lets unbound use systemd sockets if
|
||||
you enable use-systemd: yes in unbound.conf.
|
||||
|
|
|
|||
Loading…
Reference in a new issue