Have eventdns set the "truncated" bit correctly.

Fixed bug 1022; This isn't actually a live bug in Tor, since in Tor
we never generate large DNS replies.
This commit is contained in:
Nick Mathewson 2009-06-30 10:05:42 -04:00
parent 9fc3d87827
commit 7ce767181f

View File

@ -1842,7 +1842,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 = (size_t)j;