-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update embedded dnsmasq to v2.88test3 #1469
Conversation
Maybe we can use https://www.mail-archive.com/[email protected]/msg16179.html In the way to disable permutation at all. (Not sure if we want answers to be reordered) |
Tests are currently failing as our only external dependency in the testing suite (
|
I don't understand what the test is doing - but is it something we could move to a pihole.net controlled domain, so that we're not relying on an external lookup to pass the tests..? |
It verifies DNSSEC validation. The two domains we used to use have been carefully set up to once pass and once fail DNSSEC. This is what we are testing for. I'll try to replace them by other domains. DNSSEC is about this only thing we cannot set up locally in the test containers and our only external dependency. |
Tests will be restored once #1470 is merged into |
By default, when sending a query via random ports to multiple upstream servers or retrying a query dnsmasq will use a single random port for all the tries/retries. This option allows a larger number of ports to be used, which can increase robustness in certain network configurations. Note that increasing this to more than two or three can have security and resource implications and should only be done with understanding of those. Signed-off-by: DL6ER <[email protected]>
This gives dnsmasq the ability to originate retries for upstream DNS queries itself, rather than relying on the downstream client. This is most useful when doing DNSSEC over unreliable upstream network. It comes with some cost in memory usage and network bandwidth. Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
1) It's expected to fail to bind a new source port when they are scarce, suppress warning in log in this case. 2) Optimse bind_local when max_port - min_port is small. There's no randomness in this case, so we try all possible source ports rather than poking at random ones for an arbitrary number of tries. 3) In allocate_rfd() handle the case that all available source ports are already open. In this case we need to pick an existing socket/port to use, such that it has a different port from any we already hold. This gives the required property that the set of ports utilised by any given query is set by --port-limit and we don't re-use any until we have port-limit different ones. Signed-off-by: DL6ER <[email protected]>
No longer try and fail to open every port when the port range is in complete use; go straight to re-using an existing socket. Die at startup if port range is smaller than --port-limit, since the code behaves badly in this case. Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: Dominik Derigs <[email protected]>
Saying we've "flushed x outdated entries" is confusing, since the count is the total number of entries in the modified file, most of which are going to get added straight back when the file is re-read. The log now looks like dnsmasq: inotify: /tmp/dir/1 (new or modified) dnsmasq: inotify: flushed 1 addresses read from /tmp/dir/1 dnsmasq: read /tmp/dir/1 - 2 addresses which hopefully make it more obvious that /tmp/dir/1 contained one address before, and now contains two. Signed-off-by: Dominik Derigs <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
…commit. Signed-off-by: DL6ER <[email protected]>
Also Dbus SetDomainServers method. Revert getaddrinfo hints.ai_socktype to SOCK_DGRAM to eliminate duplicating every address three times for DGRAM, STREAM and RAW in the results. Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
…query type (17) Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
… patch Signed-off-by: DL6ER <[email protected]>
Tests restored |
I tried to reproduce the issue that existed back in April 22 but I can't. Permutation works even in FTL's |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/support-hostnames-and-domains-in-pihole-dns/50572/6 |
As the latter broke [1], this PR updates the tests to use a different DNSSEC validation service: https://dnssec.works [1] pi-hole/FTL#1469 (comment) Signed-off-by: Kyle Harding <[email protected]>
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/multiple-queries-required-to-get-domain-resolved/59373/3 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/conditional-forwarding-issues-w-tailscale/61522/14 |
By submitting this pull request, I confirm the following:
How familiar are you with the codebase?:
10
Updates the embedded
dnsmasq
to the next tagged version ofdnsmasq
. Highlights compared to the most recent version ofdnsmasq
(v2.87) released in FTL v5.18:New options/features
Allow domain names as well is IP addresses in
server
options - this will be especially helpful in situations where upstream destinations are primarily reachable by hostname (think of DHCP networks anddocker compose
, etc.) (Pi-hole patch)use-stale-cache
- when set, if a DNS name exists in the cache, but its time-to-live has expired,dnsmasq
will return the data anyway and attempts itself to refresh the data with an upstream query after returning the stale data.Advantages:
Disadvantages:
New
fast-dns-retry
option - gives dnsmasq the ability to originate retries for upstream DNS queries itself, rather than relying on the downstream client. This is most useful when doing DNSSEC over unreliable upstream network. Retries are generated when no reply was received for 1 second. Retries are repeated with exponential backoff until we give up after 10 seconds. Both values are configurable with millisecond accuracy.Advantages:
Drawbacks:
New
port-limit=<#ports>
option - by default, when sending a query via random ports to multiple upstream servers or retrying a query dnsmasq will use a single random port for all the tries/retries.Advantages:
Disadvantages:
New
no-round-robin
option - suppresses round-robin ordering of DNS records and ensures answers are always served in the same order.Enhance
hostsdir
to remove outdated entries on changes. Before, this required a fulldnsmasq
restart (Pi-hole patch)Improve
hostsdir
logging to log the HOSTS file used for generating a local reply (Pi-hole patch)Bugfixes
dynamic-host
when interface has/16
address (Pi-hole patch)rapid-commit
- If a host had an old lease for a different address, the rapid-commit appeared to work, but the old lease was not removed and the new lease was not recorded, so the client and server had conflicting state, leading to problems later.