The truncated bit is in the 3rd byte of a dns reply, not the 4th. [fwd-port]

svn:r1332
This commit is contained in:
Nick Mathewson 2009-06-30 14:23:18 +00:00
parent 5aefb8a6d6
commit 342ad3550b
2 changed files with 3 additions and 3 deletions

View File

@ -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 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 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 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 o Replace some read()/write() instances with send()/recv() to work properly on win32.
on win32. o Set truncated flag correctly in evdns server replies.
Changes in 2.0.1-alpha: Changes in 2.0.1-alpha:

View File

@ -1911,7 +1911,7 @@ evdns_server_request_format_response(struct server_request *req, int err)
if (j > 512) { if (j > 512) {
overflow: overflow:
j = 512; j = 512;
buf[3] |= 0x02; /* set the truncated bit. */ buf[2] |= 0x02; /* set the truncated bit. */
} }
req->response_len = j; req->response_len = j;