]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
addr fixup.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 13 Jun 2007 14:47:01 +0000 (14:47 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 13 Jun 2007 14:47:01 +0000 (14:47 +0000)
git-svn-id: file:///svn/unbound/trunk@387 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
services/outside_network.c

index 273a2cdf24739971e2928f29c56d8f5d3821c1fd..21bf259776c357567bb8fd4ae304cc8eeae2eb78 100644 (file)
@@ -3,6 +3,8 @@
          ldns and libevent are linked statically. Default is off.
        - make install and make uninstall. Works with static-exe and without.
          installation of unbound binary and manual pages.
+       - alignement problem fix on solaris 64.
+       - fixup address in case of TCP error.
 
 12 June 2007: Wouter
        - num target queries was set to 0 at a bad time. Default it to 0 and
index c0f2c1e74169eb6bb28df2583fb18d3b21af3791..cd21702460d6040a36ef8b0d4099fc911e8f1af9 100644 (file)
@@ -1006,6 +1006,7 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
         struct comm_reply* rep)
 {
        struct serviced_query* sq = (struct serviced_query*)arg;
+       struct comm_reply r2;
        sq->pending = NULL; /* removed after this callback */
        if(error==NETEVENT_NOERROR && LDNS_RCODE_WIRE(ldns_buffer_begin(
                c->buffer)) == LDNS_RCODE_FORMERR && 
@@ -1018,6 +1019,11 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
                return 0;
        }
        /* insert address into reply info */
+       if(!rep) {
+               /* create one if there isn't (on errors) */
+               rep = &r2;
+               r2.c = c;
+       }
        memcpy(&rep->addr, &sq->addr, sq->addrlen);
        rep->addrlen = sq->addrlen;
        (void)rbtree_delete(sq->outnet->serviced, sq);