From: Nick Mathewson Date: Tue, 30 Jun 2009 14:23:18 +0000 (+0000) Subject: The truncated bit is in the 3rd byte of a dns reply, not the 4th. [fwd-port] X-Git-Tag: release-2.0.3-alpha~195 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=342ad3550ba685c0b0e95a8aa98d86f1509f36ab;p=libevent The truncated bit is in the 3rd byte of a dns reply, not the 4th. [fwd-port] svn:r1332 --- diff --git a/ChangeLog b/ChangeLog index b8a0cc34..251fe7dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,8 +34,8 @@ Changes in 2.0.2-alpha: o Fix a memory error when freeing a thread-enabled event base with registered events. (Spotted by Joachim Bauch.) o Try to contain degree of failure when running on a win32 version so heavily firewalled that we can't fake a socketpair. o Activate fd events in a pseudorandom order with O(N) backends, so that we don't systematically favor low fds (select) or earlier-added fds (poll, win32). - o Replace some read()/write() instances with send()/recv() to work properly - on win32. + o Replace some read()/write() instances with send()/recv() to work properly on win32. + o Set truncated flag correctly in evdns server replies. Changes in 2.0.1-alpha: diff --git a/evdns.c b/evdns.c index 715d71c6..11e25254 100644 --- a/evdns.c +++ b/evdns.c @@ -1911,7 +1911,7 @@ evdns_server_request_format_response(struct server_request *req, int err) if (j > 512) { overflow: j = 512; - buf[3] |= 0x02; /* set the truncated bit. */ + buf[2] |= 0x02; /* set the truncated bit. */ } req->response_len = j;