Pi-hole FTL v6.0#2153
Merged
Merged
Conversation
When deriving a domain name from an IPv6 address, an address such as 1234:: would become 1234--.example.com, which is not legal in IDNA2008. Stop using the :: compression method, so 1234:: becomes 1234-0000-0000-0000-0000-0000-0000-0000.example.com Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…ing patch Signed-off-by: DL6ER <dl6er@dl6er.de>
A bug in gentoo linux https://bugs.gentoo.org/945183 reported that dnsmasq 2.90 fails to compile with GCC 15. The issue is that while previous versions of GCC defaulted to the C17 standard and C23 could be selected with "-std=c23" or "-std=gnu23", GCC 15 defaults to C23. In C23 incompatible pointer types are an error instead of a warning, so the "int (*callback)()" incomplete prototypes cause errors. For example, compiling dnsmasq 2.90 with gcc 14.2.1 and "-std=gnu23" fails with errors such as: lease.c: In function `lease_find_interfaces': lease.c:467:34: warning: passing argument 3 of `iface_enumerate' from incompatible pointer type [-Wincompatible-pointer-types[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wincompatible-pointer-types]] 467 | iface_enumerate(AF_INET, &now, find_interface_v4); | ^~~~~~~~~~~~~~~~~ | | | int (*)(struct in_addr, int, char *, struct in_addr, struct in_addr, void *) In file included from lease.c:17: dnsmasq.h:1662:50: note: expected `int (*)(void)' but argument is of type `int (*)(struct in_addr, int, char *, struct in_addr, struct in_addr, void *)' 1662 | int iface_enumerate(int family, void *parm, int (callback)()); | ~~~~~^~~~~~~~~~~ This patch uses a typedef'ed union of pointer types to get type checking of the pointers. If that's too complicated, another way might be to use (void *) casts to disable type checking. Also, some of the IPv6 callbacks had "int preferred, int valid" and some had "unsigned int preferred, unsigned int valid". This patch changes them all to "unsigned int" so they're the same and to avoid casting "u32" to "int", eg: u32 preferred = 0xffffffff; callback(..., (int)preferred, ...) Even if those cast values aren't used in the callback, casting u32 to "int" feels bad, especially if "int" is 32 bits. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
This is not supported, and doesn't behave as one might expect. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…ing of dnsmasq ("extra" + protocol information)
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…ompiling Signed-off-by: DL6ER <dl6er@dl6er.de>
…all runtime of the dhcp-discover tool Signed-off-by: DL6ER <dl6er@dl6er.de>
Dynamically lower the GC interval
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Ommision broke DHCP relay on *BSD. Signed-off-by: DL6ER <dl6er@dl6er.de>
This acts almost exactly like --dhcp-option except that the defined option is only sent when replying to PXE clients. More importantly, these options are sent in reply PXE clients when dnsmasq in acting in PXE proxy mode. In PXE proxy mode, the set of options sent is defined by the PXE standard and the normal set of options is not sent. This config allows arbitrary options in PXE-proxy replies. A typical use-case is to send option 175 to iPXE. Thanks to Jason Berry for finding the requirement for this. Signed-off-by: DL6ER <dl6er@dl6er.de>
When using PXE proxy-DHCP, dnsmasq supplies PXE information to the client, which also talks to another "normal" DHCP server for address allocation and similar. The normal DHCP server may be on the local network, but it may also be remote, and accessed via a DHCP relay. This change allows dnsmasq to act as both a PXE proxy-DHCP server AND a DHCP relay for the same network. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Remove duplicated code and silence a harmless warning
Update embedded SQLite3 to 3.47.2
…. The current implementation mixed it in a harmless way, however, it is generating a warning in GCC 14 and up. Also, reduce code duplication Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
A retry to upstream DNS servers triggered by the following conditions 1) A query asking for the same data as a previous query which has not yet been answered. 2) The second query arrives more than two seconds after the first. 3) Either the source of the second query or the id field differs from the first. fails to set the case of the retry to the same pattern as the first attempt. However dnsmasq expects the reply from upstream to have the case pattern of the first attempt. If the answer to the retry arrives before the answer to the first query, dnsmasq will notice the case mismatch, log an error, and ignore the answer. The worst case scenario would be the first upstream query or reply is lost and there would follow a short period where all queries for that particular domain would fail. This is a 2.91 development issue, it doesn't apply to previous stable releases. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Update dnsmasq to 2.91rc3
…possible detection (and startup prevention) of legit long-lived other processes like "pihole-FTL sqlite3", etc. Signed-off-by: DL6ER <dl6er@dl6er.de>
…running duplicates don't interfere with each other. This can be seen as the fallback solution in case the PID file-based duplicate detection did not work due to security restrictions concerning process deetection on the system (see comment in function daemon.c:another_FTL() for further context) Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
To complement the previous one, which fixed the retry path when the query is retried from a different id/source address, this fixes retries from the same id/source address. Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Update dnsmasq to 2.91rc4
They should be equal, but that depends on untrusted data. Signed-off-by: DL6ER <dl6er@dl6er.de>
… processes's state as the latter may not be allowed if the other process is running as another user and we don't have CAP_KILL (or am root) Signed-off-by: DL6ER <dl6er@dl6er.de>
…dhcp-discover routine to prevent hanging threads from being able to cause the tool to stall forever Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Fix duplicate process detection
Signed-off-by: DL6ER <dl6er@dl6er.de>
Add proper timeout handling to dhcp-dicsover feature
DL6ER
previously approved these changes
Feb 18, 2025
yubiuser
previously approved these changes
Feb 18, 2025
Signed-off-by: DL6ER <dl6er@dl6er.de>
Update embedded dnsmasq
yubiuser
previously approved these changes
Feb 18, 2025
Update embedded SQLite3 to 3.49.1
yubiuser
approved these changes
Feb 18, 2025
DL6ER
approved these changes
Feb 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's Changed
falsewhen parsing lists by @rdwebdesign in The new checkOnly argument should befalsewhen parsing lists #1577dnsmasq.confby adding blank lines to group similar settings by @yubiuser in Improve readability ofdnsmasq.confby adding blank lines to group similar settings #1751POST \dns\blockingrequest documentation by @akordowski in FixPOST \dns\blockingrequest documentation #1846dns.domainvalidation to accept an empty string as value by @rdwebdesign in Changes thedns.domainvalidation to accept an empty string as value #2113New Contributors
POST \dns\blockingrequest documentation #1846Full Changelog: v5.25.2...v6.0