These are chat archives for CZ-NIC/knot-resolver
Knot Resolver: Resolve DNS names like it's 2019! https://www.knot-resolver.cz/support/
There are more things one has to do than just answer:put(), I'm afraid. As I see it, there's currently not a "real API" in kresd for most stuff; it's mainly modules manipulating the internal structures (with help of some functions).
The code from policy.enforce for policy.DENY should be a good start. Note that it puts stuff to AUTHORITY section whereas you want to put stuff to ANSWER.
answer:rcode(kres.rcode.NOERROR) answer:begin(kres.section.ANSWER) answer:put('\2my\4test', 300, kres.class.IN, kres.type.A, '\192\12\0\1\0\1\0\0\1\44\0\4\127\0\0\1') return kres.DONE
answer:putreturns error code, BTW, which is what you could recognize it by...