]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
lib/rules: implement forwarding
authorVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 19 May 2023 07:09:06 +0000 (09:09 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 12 Jun 2023 08:32:57 +0000 (10:32 +0200)
commit6f1d9b6140f0ec39eccbf976f4a7ad15bd9378c7
tree4b798b65f52ad523061335688335edec90e168e4
parentd58f6168d32e04051b2aae6ee37031e179358bf6
lib/rules: implement forwarding

Typical use cases should work now, briefly tested:
 - forwarding all to a resolver
 - forwarding a subtree downgraded to insecure (to resolver or auth)
 - forwarding a subtree to auth without changing DNSSEC chain (atypical)

In some places we need to repeat kr_make_query()
The issue is that some of its inputs (e.g. STUB/FORWARD, zone cut)
are now not known at the beginning of PRODUCE yet.
Also, checking that QNAME matches is useless on a cached reply.
15 files changed:
daemon/lua/kres-gen-30.lua
daemon/lua/kres-gen-31.lua
daemon/lua/kres-gen-32.lua
daemon/lua/kres-gen.sh
lib/cache/api.c
lib/layer/iterate.c
lib/meson.build
lib/resolve-produce.c
lib/resolve.h
lib/rplan.h
lib/rules/api.c
lib/rules/api.h
lib/rules/forward.c [new file with mode: 0644]
lib/rules/impl.h
modules/policy/policy.lua