[Dnsmasq-discuss] Question about tcp_request in 2.91
Tijs Van Buggenhout
tijs.van.buggenhout at axsguard.com
Fri Feb 28 15:47:34 UTC 2025
Hi Simon,
I have a question about commit 6656790f in regard changes to tcp_request
function.
commit 6656790f2498f2a0b21086bc4ab47a2e38429a7c
Author: Simon Kelley <simon at thekelleys.org.uk>
Date: Tue Jan 7 20:46:33 2025 +0000
Handle queries with EDNS client subnet fields better.
The call to add_edns0_config moved up, even before the "find_pseudoheader"
condition that sets have_pseudoheader. To my understanding add_edns0_config
prepares the original request to be forwarded (with regard to EDNS).
Since the function adds EDNS to the packet, the original query is altered even
before it has been processed and decided whether to handle locally or forward,
ie. it invalidates "have_pseudoheader".
The general logic in receive_query differs from tcp_request:
1. checks
2. find_pseudoheader
3. flags
4. answer : {disallowed,auth, saved_question + request (from cache)} => send
5. forward if not (local) answered
vs
1. checks
2. saved_question
3. find_pseudoheader
4. flags
5. answer : {disallowed,auth,request (from cache)} => send
6. forward if not (local) answered
Kind regards,
Tijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20250228/bf50dd59/attachment.sig>
More information about the Dnsmasq-discuss
mailing list