From: Andreas Gustafsson Date: Mon, 8 Jan 2001 20:59:55 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.1.0b3~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bce7c42fd24a425d834259408135e18666d72e43;p=thirdparty%2Fbind9.git pullup: 666. [bug] If a request sent by dig is longer than 512 bytes, use TCP. --- diff --git a/CHANGES b/CHANGES index 078aefedfec..7a47cf05c69 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ --- 9.1.0b3 released --- + 666. [bug] If a request sent by dig is longer than 512 bytes, + use TCP. + 661. [bug] Certain UDP IXFR requests caused an assertion failure (mpctx->allocated == 0). [RT #355, #394, #623] diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 019738aebf4..611eb5a514f 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.174 2000/12/11 19:15:45 bwelling Exp $ */ +/* $Id: dighost.c,v 1.174.2.1 2001/01/08 20:59:55 gson Exp $ */ /* * Notice to programmers: Do not use this code as an example of how to @@ -1521,6 +1521,12 @@ setup_lookup(dig_lookup_t *lookup) { check_result(result, "dns_message_renderend"); debug("done rendering"); + /* + * Force TCP mode if the request is larger than 512 bytes. + */ + if (isc_buffer_usedlength(&lookup->sendbuf) > 512) + lookup->tcp_mode = ISC_TRUE; + lookup->pending = ISC_FALSE; for (serv = ISC_LIST_HEAD(lookup->my_server_list);