Commit Graph

4302 Commits

Author SHA1 Message Date
Adam Warner 844c8b9fda
Merge pull request #1486 from pi-hole/development
FTL v5.19.2
2022-11-17 12:52:14 +00:00
DL6ER f4c9460f21
Merge pull request #1485 from pi-hole/fix/forked_shmSettings
Fix shared memory crashes in TCP forks
2022-11-17 12:59:07 +01:00
DL6ER cafa2eff8f
Merge pull request #1482 from pi-hole/update/sqlite_3.40.0
Update embedded SQLite3 engine to version 3.40.0
2022-11-17 12:51:42 +01:00
DL6ER 9dd37ecafb
Merge pull request #1480 from pi-hole/tweak/unique_messages
Always ensure FTL messages are unique
2022-11-17 12:51:34 +01:00
DL6ER 08b347b75f
Merge pull request #1484 from pi-hole/update/dnsmasq
Update embedded dnsmasq to v2.88rc1
2022-11-17 12:51:04 +01:00
DL6ER 78597ddf1c
Verify PID of shared memory without remapping global shmSettings object
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-16 21:57:13 +01:00
DL6ER b72d3b797c
Update embedded dnsmasq to v2.88rc1
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-16 21:45:42 +01:00
Simon Kelley bc1acb24e8
Handle DS records for unsupported crypto algorithms correctly.
Such a DS, as long as it is validated, should allow answers
in the domain is attests to be returned as unvalidated, and not
as a validation error.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-16 21:44:27 +01:00
Simon Kelley b6e61c2da0
Fix GOST signature algorithms for DNSSEC validation.
Use CryptoPro version of the hash function.
Handle the little-endian wire format of key data.
Get the wire order of S and R correct.

Note that Nettle version 3.6 or later is required for GOST support.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-16 21:44:23 +01:00
Simon Kelley c030b2d610
Handle known DNSSEC signature algorithms which are not supported.
This fixes a confusion if certain algorithms are not supported
because the version is the crypto library is too old.  The validation
should be treated the same as for a completely unknown algorithm,
(ie return unverified answer) and not as a validation failure
(ie return SERVFAIL).

The algorithems affected are GOST and ED448.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-16 21:44:19 +01:00
DL6ER bb57105001
Update embedded SQLite3 engine to version 3.40.0
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-16 17:58:46 +01:00
DL6ER c689cf23ff
Add debugging output to verify_shmem_pid()
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-16 04:26:55 +01:00
DL6ER af495664f9
Adlist warning -> ADLIST WARNING
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-15 21:28:38 +01:00
DL6ER fc212c383a
Always ensure FTL messages are unique
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-15 19:33:47 +01:00
DL6ER 7af658bc11
Merge pull request #1477 from pi-hole/master
sync: master to development
2022-11-14 23:05:10 +01:00
Adam Warner b48b3e1fb2
Merge pull request #1476 from pi-hole/new/git_hash
Add hash printing and restore local compilation
2022-11-14 22:01:50 +00:00
DL6ER b63a37281d
Force 8 digits to display git object names
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-14 22:52:53 +01:00
DL6ER 64d5b3af4e
Fix CMake ENV var comparison to restore compilation in environments where this variable is unset
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-14 22:41:31 +01:00
DL6ER a052113364
Add "pihole-FTL --hash" printing the current git hash of the binary's source code
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-14 22:21:10 +01:00
Adam Warner 32f4bb7b72
Merge pull request #1474 from pi-hole/master
sync: master to development
2022-11-14 19:02:42 +00:00
Adam Warner 6075a70acc
Merge pull request #1473 from pi-hole/development
Pi-hole FTL v5.19
2022-11-14 18:55:44 +00:00
DL6ER 9fe7fb5686
Merge pull request #1472 from pi-hole/special/CI_development
Update CI to ftl-build:v1.23 containers
2022-11-14 08:19:50 +01:00
DL6ER 80b1d3edba
Run tests for all x86_* architectures
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-13 18:20:27 +01:00
DL6ER d098f05f56
Use ftl-build:v1.23 containers
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-13 16:29:23 +01:00
DL6ER 57352c9e7c
Add building the full binary in the x86_64 container
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-13 10:44:56 +01:00
DL6ER eec622c687
Add shortcut to compile an all-options build of dnsmasq inside FTL. Note that this does not include ubus as it is an OpenWRT-native thing that cannot be setup easily on any other distro.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-10 20:36:25 +01:00
DL6ER 94202c54c7
Merge pull request #1469 from pi-hole/update/dnsmasq
Update embedded dnsmasq to v2.88test3
2022-11-10 18:48:29 +01:00
DL6ER 4b798e8aec
Fix incorrect three-way merge happened when importing the stale-cache patch
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:49 +01:00
DL6ER 5556dd5d78
Add dnsmasq tag v2.88test3
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:49 +01:00
Simon Kelley 2a94aef407
Fix --server=/domain/#
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:49 +01:00
Simon Kelley 1449829f1d
Fix --server with multiple domains.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:49 +01:00
Simon Kelley ed8d37bf0b
Make specifying nameservers by name work for DBus API.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:49 +01:00
Simon Kelley 0ae86d2641
Call freeaddrinfo() in domain_rev[46]()
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
DL6ER 7ecd358f96
Allow FTL to analyze stale cache replies. They are assigned to a new query type (17)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
DL6ER 42c71058a9
Add support for dnsmasq flags F_SRV and F_STALE
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
DL6ER 801f034ca1
Add dnsmasq tag v2.88test2
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Simon Kelley 891acaa301
Extend specifying DNS servers by domain-name to --rev-server
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 <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Simon Kelley 1b2612cff6
Fix breakage of --local=/domain.name/1.2.3.4 in immediately previous commit.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Dominik Derigs 703ee7e2b0
Allow domain names as well is IP addresses in --server options.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Simon Kelley 2bf2863224
Reconcile "names" and "address" counts when reading hostfiles.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Simon Kelley 8aba33f751
Inotify: make "flushed" log message more understandable.
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 <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Dominik Derigs 779ba107fa
Do not (try to) re-read deleted files inside a --hostsdir.
Signed-off-by: Dominik Derigs <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Simon Kelley 3a6dd32f91
Fix in dhcpv4 rapid-commit code.
1) Cosmetic: don't log the tags twice.

2) Functional. If a host has an old lease for a different address,
   the rapid-commit will appear to work, but the old lease will
   not be removed and the new lease will not be recorded, so
   the client and server will have conflicting state, leading to
   problems later.

Signed-off-by: Dominik Derigs <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Simon Kelley cdf9d9d5ab
Add --no-round-robin option.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Simon Kelley 4cfb84ae99
Fix loss of DNS servers on config reload.
A bug, introduced in 2.87, which could result in DNS
servers being removed from the configuration when reloading
server configuration from DBus, or re-reading /etc/resolv.conf
Only servers from the same source should be replaced, but some
servers from other sources (ie hard coded or another dynamic source)
could mysteriously disappear.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Dominik Derigs a1b66e89d2
Handle multiple addresses when removing duplicates in host files.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Dominik Derigs e8d19f71cc
Enhance --hostdir so that records are automatically removed when re-reading.
Initial patch from Dominik Derigs, re-written by Simon Kelley.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
Dominik Derigs 652c1e8a90
Improve logging of DNS record source from --hostsdir files.
Patch author Dominik Derigs <dl6er@dl6er.de> with subsequent bugfixes
and tweaks from Simon Kelley.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
DL6ER 0dc053364b
Locally blocked queries are not stale
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00
DL6ER d39829875f
Update embedded dnsmasq to v2.88test1
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 20:09:48 +01:00