]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
add bindings for the checkout layer
authorMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 6 Apr 2018 05:48:51 +0000 (22:48 -0700)
committerMarek Vavruša <mvavrusa@cloudflare.com>
Fri, 7 Sep 2018 17:45:21 +0000 (10:45 -0700)
This one was missing from the current bindings. The checkout layer
runs when the worker attempts to send a DNS query to given upstream
when the address is already determined. The layer can add EDNS options
or update outbound query, or block particular addresses / protocol.

lib/resolve.c

index af1f317f23efed102fc64a4ca462b8b83606cd0d..fd0312a5e97a948f2fc18fb270c3694164a36d30 100644 (file)
@@ -1537,7 +1537,9 @@ int kr_resolve_checkout(struct kr_request *request, struct sockaddr *src,
        }
        struct kr_query *qry = array_tail(rplan->pending);
 
-       /* Run the checkout layers and cancel on failure. */
+       /* Run the checkout layers and cancel on failure.
+        * The checkout layer doesn't persist the state, so canceled subrequests
+        * don't affect the resolution or rest of the processing. */
        int state = request->state;
        ITERATE_LAYERS(request, qry, checkout, packet, dst, type);
        if (request->state == KR_STATE_FAIL) {