]> granicus.if.org Git - libevent/commitdiff
The truncated bit is in the 3rd byte of a dns reply, not the 4th. [fwd-port]
authorNick Mathewson <nickm@torproject.org>
Tue, 30 Jun 2009 14:23:18 +0000 (14:23 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 30 Jun 2009 14:23:18 +0000 (14:23 +0000)
svn:r1332

ChangeLog
evdns.c

index b8a0cc34f862dc2381cc119e48492ce069bf9812..251fe7dda4f5d43768d5e58dfd352960da9a8a34 100644 (file)
--- 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 715d71c618433e20ebdc4ea46eb91af00492ff8a..11e252546cce0b19fdd116c22783e2f1425af62d 100644 (file)
--- 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;