From: Marek VavruĊĦa Date: Fri, 6 Apr 2018 05:48:51 +0000 (-0700) Subject: add bindings for the checkout layer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b63dd9a413e6f88d45d6c1d2155f2780dba3e8a4;p=thirdparty%2Fknot-resolver.git add bindings for the checkout layer 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. --- diff --git a/lib/resolve.c b/lib/resolve.c index af1f317f2..fd0312a5e 100644 --- a/lib/resolve.c +++ b/lib/resolve.c @@ -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) {