DL6ER
0766a9e4fc
Update embedded dnsmasq to v2.88rc5
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-27 12:03:43 +01:00
DL6ER
f72bbc9e0e
Re-install Pi-hole modifications to src/dnsmasq/forward.c and src/dnsmasq/rfc1035.c
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-27 11:03:28 +01:00
Simon Kelley
4650c3d9f5
Handle malformed DNS replies better.
...
If we detect that that reply from usptream is malformed,
transform it into a SERVFAIL reply before sending to the
original requestor.
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-27 10:50:30 +01:00
DL6ER
9bb96b5b93
Undo Pi-hole modification in src/dnsmasq/forward.c
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-27 10:49:23 +01:00
Brad Smith
c81b15ee65
Fix warning in cache.c
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-27 10:44:13 +01:00
Dominik Derigs
1f2ef8c037
Make max staleness of stale cache entries configurable and default to one day.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-27 10:44:09 +01:00
Petr Menšík
208a1824b1
Fix use-after-free in mark_servers()
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-27 10:44:03 +01:00
DL6ER
4fdf3d9ab4
Re-add /*** Pi-hole modification ***/ comments
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-26 18:13:33 +01:00
DL6ER
7023feaccc
Merge branch 'development' into update/lua
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-25 19:55:41 +01:00
DL6ER
bc4a2b11e9
Merge pull request #1492 from pi-hole/new/embedded_lua_scripts
...
Embedded lua scripts into FTL
2022-11-25 19:51:32 +01:00
DL6ER
d626c0d6c7
Add missing newline in front of LUA details in pihole-FTL -vv
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-25 19:18:47 +01:00
DL6ER
8957ee456b
Update embedded LUA to 5.4.4
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-25 19:13:51 +01:00
DL6ER
717181335b
Add LUA patches
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-25 19:07:49 +01:00
DL6ER
d066946e3f
Print embedded libraries in pihole-FTL -vv
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-25 12:07:46 +01:00
DL6ER
a1ba4bc97d
Update inspect.lua
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-25 12:07:46 +01:00
DL6ER
5252aeb077
Reference sqlite3ErrName instead of copying it. This requires SQLite3 patching
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-25 11:35:08 +01:00
DL6ER
51b2b71756
Print extended error code if anything in dbquery() fails. This will be helpful in a lot of cases where we'd only be logging 'disk I/O error' but a more specififc error is available
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-25 11:32:15 +01:00
Petr Menšík
f74523d391
fixup! Handle DS records for unsupported crypto algorithms.
2022-11-23 04:16:32 +01:00
Simon Kelley
96e1c4407e
Optimise readng large number --server options at start up.
...
When re-reading upstream servers from /etc/resolv.conf or other
sources that can change dnsmasq tries to avoid memory fragmentation by
re-using existing records that are being re-read unchanged. This
involves seaching all the server records for each new one installed.
During startup this search is pointless, and can cause long start
times with thousands of --server options because the work needed is
O(n^2). Handle this case more intelligently. Thanks to Ye Zhou for
spotting the problem and an initial patch.
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-23 04:15:54 +01:00
DL6ER
395e0792d8
Use luaL_loadbufferx to pass name directly to interpreter
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-20 13:56:42 +01:00
DL6ER
0fea2d586b
Add facility to embedd LUA scripts into FTL and run them during luainit
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-20 12:57:39 +01:00
DL6ER
bfd2c988ce
Merge pull request #1491 from pi-hole/update/dnsmasq
...
Update embedded dnsmasq to v2.88rc3
2022-11-19 09:34:44 +01:00
Simon Kelley
b7c858f6b5
Fix SEGV on --local= added by immediately previous commit.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-19 08:17:35 +01:00
Simon Kelley
576e766b59
Fix struct hostinfo free code and BSD compile.
...
The code added in6 c596f1cc1d92b2b90ef5ce043ace314eefa868b
fails to free the returned datastructures from gethostinfo()
because sdetails.hostinfo is used to loop through the addresses
and ends up NULL. In some libc implementations this results
in a SEGV when freeaddrinfo() is called.
Also fix FTBFS under BSD. Thanks to Johnny S. Lee for the bug report.
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-19 08:17:28 +01:00
DL6ER
fe4077ea9f
Increase default SQLite3 cache size from 2000 kiB to 16 MiB
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-11-18 10:51:43 +01: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
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
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
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
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
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
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
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
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