From: Wouter Wijngaards Date: Mon, 16 Sep 2013 09:07:08 +0000 (+0000) Subject: - Fix#524: max-udp-size not effective to non-EDNS0 queries, from X-Git-Tag: release-1.4.22rc1~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68e58ee194fc2f71afa477a364cfc8ec92d40730;p=thirdparty%2Funbound.git - Fix#524: max-udp-size not effective to non-EDNS0 queries, from Daisuke HIGASHI. git-svn-id: file:///svn/unbound/trunk@2955 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/daemon/worker.c b/daemon/worker.c index 935773bd7..37d019dff 100644 --- a/daemon/worker.c +++ b/daemon/worker.c @@ -830,15 +830,16 @@ worker_handle_request(struct comm_point* c, void* arg, int error, (int)edns.udp_size); log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen); edns.udp_size = NORMAL_UDP_SIZE; - } else if(edns.edns_present && - edns.udp_size > worker->daemon->cfg->max_udp_size && + } + if(edns.udp_size > worker->daemon->cfg->max_udp_size && c->type == comm_udp) { - verbose(VERB_QUERY, "worker request: EDNS bufsize %d exceeds " - "max-udp-size, fixed", (int)edns.udp_size); + verbose(VERB_QUERY, + "worker request: max UDP reply size modified" + " (%d to max-udp-size)", (int)edns.udp_size); log_addr(VERB_CLIENT,"from",&repinfo->addr, repinfo->addrlen); edns.udp_size = worker->daemon->cfg->max_udp_size; } - if(edns.edns_present && edns.udp_size < LDNS_HEADER_SIZE) { + if(edns.udp_size < LDNS_HEADER_SIZE) { verbose(VERB_ALGO, "worker request: edns is too small."); log_addr(VERB_CLIENT, "from", &repinfo->addr, repinfo->addrlen); LDNS_QR_SET(ldns_buffer_begin(c->buffer)); diff --git a/doc/Changelog b/doc/Changelog index 97e84341a..544fbef56 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +16 Sep 2013: Wouter + - Fix#524: max-udp-size not effective to non-EDNS0 queries, from + Daisuke HIGASHI. + 10 Sep 2013: Wouter - MIN_TTL and MAX_TTL also in time_t. - tag 1.4.21rc1 made again.