]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
fallback EDNS on NOTIMPL.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 6 Feb 2008 15:08:38 +0000 (15:08 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 6 Feb 2008 15:08:38 +0000 (15:08 +0000)
git-svn-id: file:///svn/unbound/trunk@928 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
doc/TODO
services/outside_network.c

index f64c7b54beb4ee00aeae07e0926b3a48eb646f13..cf4e8ad460ee912c3a161268f9a9f86dfdb78efc 100644 (file)
@@ -5,6 +5,7 @@
        - changed name of ub_val_result_free to ub_val_resolve_free.
        - removes warning message during library linking, renamed
          libunbound/unbound.c -> libunbound.c and worker to libworker.
+       - fallback without EDNS if result is NOTIMPL as well as on FORMERR.
 
 5 February 2008: Wouter
        - statistics-interval: seconds option added.
index ef5f0b3d817f5913ed6b5dd56b32151c6a779d1f..c60f8f638849aad78ad537ca41950f66590d0450 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -7,7 +7,6 @@ o detect OS/400 pthreads implementation that allows upgrading to writelock
 o understand synthesized DNAMEs, so those TTL=0 packets are cached properly.
 o understand NSEC/NSEC3, aggressive negative caching, so that updates to
   NSEC/NSEC3 will result in proper negative responses.
-o fallback without EDNS if result is NOTIMPL, now only on FORMERR like in java.
 o scrubber has slow pkt_subdomain and pkt_strict_subdomain functions.
 o get serverselection algorithm out of local optimum.
   make subtargets to get rtt info for a couple of targets, like fetch-policy.
index dd019d462071fa1ec6208654a91d85564bdfc8e8..50fa846c06e257399e56f7bfc912a69eed3f8ce3 100644 (file)
@@ -1034,9 +1034,10 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
        if(error==NETEVENT_NOERROR)
                infra_update_tcp_works(sq->outnet->infra, &sq->addr,
                        sq->addrlen);
-       if(error==NETEVENT_NOERROR && LDNS_RCODE_WIRE(ldns_buffer_begin(
-               c->buffer)) == LDNS_RCODE_FORMERR && 
-               sq->status == serviced_query_TCP_EDNS) {
+       if(error==NETEVENT_NOERROR && sq->status == serviced_query_TCP_EDNS &&
+               (LDNS_RCODE_WIRE(ldns_buffer_begin(c->buffer)) == 
+               LDNS_RCODE_FORMERR || LDNS_RCODE_WIRE(ldns_buffer_begin(
+               c->buffer)) == LDNS_RCODE_NOTIMPL) ) {
                if(!infra_edns_update(sq->outnet->infra, &sq->addr, 
                        sq->addrlen, -1, time(0)))
                        log_err("Out of memory caching no edns for host");
@@ -1109,8 +1110,9 @@ serviced_udp_callback(struct comm_point* c, void* arg, int error,
                }
        }
        if(error == NETEVENT_NOERROR && sq->status == serviced_query_UDP_EDNS 
-               && LDNS_RCODE_WIRE(ldns_buffer_begin(c->buffer)) 
-                       == LDNS_RCODE_FORMERR) {
+               && (LDNS_RCODE_WIRE(ldns_buffer_begin(c->buffer)) 
+                       == LDNS_RCODE_FORMERR || LDNS_RCODE_WIRE(
+                       ldns_buffer_begin(c->buffer)) == LDNS_RCODE_NOTIMPL)) {
                /* note no EDNS, fallback without EDNS */
                if(!infra_edns_update(outnet->infra, &sq->addr, sq->addrlen,
                        -1, (time_t)now.tv_sec)) {