-
Short descriptionPowerDNS Recursor 5.2.0 automatically adds EDNS Client Subnet (ECS) to all queries, even when not specified by the client, despite setting Environment
Steps to reproduce
Expected behaviour
Actual behaviour
Other information
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This is expected and intentional behavior. You're hitting this code, which includes an explanation: pdns/pdns/recursordist/syncres.cc Lines 6092 to 6109 in 544037c (Random fun fact: because of other code, the condition at line 6092 will always be true) |
Beta Was this translation helpful? Give feedback.
-
Thanks, but I'm a little confused. How would I achieve the goal of not sending any ECS options to authoritative servers unless the subnet is explicitly provided in the query? I'm using dig for testing, in reality there is a DNS server sitting in front of PowerDNS that will provide dynamic ECS values based on user configuration. The value of |
Beta Was this translation helpful? Give feedback.
-
You can't. |
Beta Was this translation helpful? Give feedback.
-
@dwfreed hits the nail on the head. On an additional note, do not send ECS info to all the nameservers you're contacting. Some of them do not respond well to ECS containing queries and in general it reduces cache performance in the Recursor. Only send ECS to nameservers for which it is useful. So restrict I'm switching this to a discussion as it it's not a bug. |
Beta Was this translation helpful? Give feedback.
-
Somehow converting to a discussion does not work and it becomes an issue again. |
Beta Was this translation helpful? Give feedback.
You can't.
pdns-recursor
isn't set up to be able to do that, because an answer cached without ECS will always be returned regardless of ECS from the source, so if it's supposed to be providing ECS to an auth, it needs to always provide ECS to that auth in some form.