Commit Graph

3517 Commits

Author SHA1 Message Date
DL6ER 54798be3f8 Make Pi-hole-bundled scripts (e.g. inspect) also available in dnsmasq/web LUA environments. So far, they were only available in the CLI
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-26 08:32:53 +02:00
DL6ER 359e1461da Add new function pihole.get_memdb() which can be used to access the in-memory database used by FTL for internal processing. Note that the debug.database flag must be set to true in order to be able to access the database. This is a security measure to prevent the memory database from being exposed to the Lua environment when this is not needed as modifying the memory database can have serious consequences (incorrect statistics, etc).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-26 08:30:51 +02:00
DL6ER 697518dac0 Define lsqlite3 version available through lsqlite3.lversion() - it is usually defined by rockspec but we are not using rockspec here but instead include the module directly into the code
Build, Test, Deploy / smoke-tests (push) Waiting to run
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Blocked by required conditions
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Blocked by required conditions
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Blocked by required conditions
Codespell / spell-check (push) Waiting to run
Check for merge conflicts / merge-conflict (push) Waiting to run
API validation / Node (push) Waiting to run
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 13:39:38 +02:00
DL6ER 93b0bd0d7d Add new LUA patch
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 12:09:17 +02:00
DL6ER 94b30e8fa7 Make lsqlite3 globally available in LUA
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 11:58:06 +02:00
DL6ER aac501c326 Add lsqlite3 CI tests
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 11:54:52 +02:00
DL6ER b5c8938d81 Remove deprecated functions from lsqlite3 codebase
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 10:37:56 +02:00
DL6ER de2750dfd6 Add lsqlite3 - an SQLite 3 database binding for Lua 5 (taken from http://lua.sqlite.org/index.cgi/index)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-25 10:36:46 +02:00
DL6ER 9e329be3ef Fix DNS-SD query analysis
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-21 19:32:26 +02:00
Christian König b3182568a5 Fix API hint
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-06-15 13:16:37 +02:00
Dominik 01c5c5629b Merge pull request #1994 from pi-hole/fix/env_password
Check if the newly set password is the same as the old one
2024-06-15 07:45:45 +02:00
DL6ER 5a6a212980 Add special handling for systems without password in the password checking short-circuiting
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-13 20:28:37 +02:00
DL6ER ec6750d42f Make definition of __USE_MISC conditional
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-10 20:06:41 +02:00
DL6ER 2406e1a70e Check if the newly set password is the same as the old one
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-06 20:42:06 +02:00
DL6ER 44d57e5b37 Add checking of return status of sqlite3_open_v2 to ensure we are not trying to use the database when it failed to open
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-06 16:17:01 +02:00
Adam Warner 61826a41e1 Merge pull request #1883 from pi-hole/tweak/remove_expert_flag
Remove (undocumented) advanced flag in details config output
2024-06-05 21:11:54 +01:00
Dominik a72440292c Merge pull request #1987 from pi-hole/tweak/cert_no_tls
Skip certificate domain check when TLS is not actually used
2024-06-03 22:48:39 +02:00
Dominik a564e329f4 Merge pull request #1990 from pi-hole/fix/long_dns_names
Fix possible heap-corruption bug
2024-06-03 22:39:36 +02:00
DL6ER af0468eb36 Fix very long DNS names (>64 bytes) potentially crashing the internal name resolving mechanism, the new limit is 256 bytes with proper boundary checking
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-03 13:29:06 +02:00
Dominik b20d80f740 Merge pull request #1989 from pi-hole/fix/regex_diagnosis
Fix incorrect unification of regex warnings
2024-06-03 13:08:22 +02:00
DL6ER 189979284f Store correct database ID when issuing a warning
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-03 11:46:39 +02:00
DL6ER f2c14cce25 Fix incorrect unification of regex warnings
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-03 09:48:13 +02:00
Dominik d3437814cc Merge pull request #1986 from pi-hole/fix/retry_truncated
Internal name resolution over UDP with fallback to TCP
2024-06-02 21:14:53 +02:00
DL6ER d3439593a1 Default to resolve internal PTRs using UDP, fall back to TCP for individual queries on UDP truncation (commonly seen in conjunction with DNSSEC)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-02 19:55:28 +02:00
DL6ER 58c59a0aef Skip certificate domain check when TLS is not actually used even if a certificate is available
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-02 11:56:53 +02:00
DL6ER 14ea246f9a Always include timezone in human-readable timestamps
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-02 10:19:26 +02:00
DL6ER aac9968eb0 Merge branch 'development-v6' into new/timezone
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-06-01 06:38:38 +02:00
DL6ER 306710e74a Add timezone information where this is appropriate. We do not include this in the log files to not needlessly change for format. Open for discussion
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-30 19:53:53 +02:00
DL6ER 1a5e7f6bf8 Add new dhcp.ignoreUnknownClients option
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-30 12:26:40 +02:00
DL6ER 8e34c3e940 Merge branch 'development-v6' into tweak/remove_expert_flag 2024-05-30 09:08:14 +02:00
Dominik 7ff016f21c Merge pull request #1737 from pi-hole/new/migrate_dnsmasq_conf
Read config files from new location
2024-05-30 07:03:23 +02:00
Dominik 47c7de6c93 Merge pull request #1976 from pi-hole/fix/resolver
Improve internal DNS resolver
2024-05-30 06:29:46 +02:00
DL6ER 19715ead9a Add help description of new optional ptr IP [tcp] flag
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-29 20:06:50 +02:00
DL6ER 86d683340a Merge branch 'development-v6' into fix/resolver 2024-05-29 19:39:33 +02:00
DL6ER c6e776d936 Merge branch 'development-v6' into tweak/env_reset 2024-05-29 19:20:24 +02:00
Dominik 23d94763a5 Merge pull request #1962 from pi-hole/new/clang
Add Clang compiler support and update project to C17 standard
2024-05-29 19:19:26 +02:00
DL6ER 980cc84fcd Reset special debug.all in a similar way
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-29 19:09:44 +02:00
DL6ER 7bfe4dc26e Reset config options previously forced by env vars but not any longer
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-29 18:29:24 +02:00
DL6ER a5f5092f5a List forced environment variables at end of the config file
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-28 21:47:11 +02:00
DL6ER 2cb6b36dca Print config file statistics at the end of the config file
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-28 21:33:45 +02:00
DL6ER 3de9e12f70 Change magic comment put next to config options which are forced through the environment
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-28 21:32:04 +02:00
DL6ER 090c1adabf Implement later retrying if name resolution attempt failed temporarily (e.g., broken pipe). Also use TCP protocol for upstream server name resolution
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-27 08:25:30 +02:00
DL6ER 5db4ade057 Use TCP queries for internal name resolution to avoid truncated replies
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-26 21:22:29 +02:00
DL6ER 2843fb0203 Fix forgotten update of lastQuery of upstream servers
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-26 11:42:11 +02:00
DL6ER 36cb3a4f79 Add more debugging for the internal name resolution process: (1) about the PTR we sent (and where), (2) about the status of the answer, (3) whether the answer was truncated (and, hence, ignored), (4) about answers skipped because they are not of type PTR, and (5) when we are trying to get client host names from the database (without any actual PTR lookups)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-26 11:36:46 +02:00
DL6ER 40eee1ac9c Addres spellchecker complaints
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-25 09:57:46 +02:00
DL6ER dc204a41b0 Use v2.6 CI containers and nightly for the devcontainer
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-25 09:54:37 +02:00
Dominik 825a14a69b Merge pull request #1974 from pi-hole/update/sqlite_3.46.0
Update embedded SQLite3 to 3.46.0
2024-05-23 21:51:42 +02:00
DL6ER 3afd9f0d41 Update embedded SQLite3 to 3.46.0
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-23 20:53:09 +02:00
DL6ER be9fe875f6 Always try to chown auxiliary database files, not only when chown of the database files itself failed
Signed-off-by: DL6ER <dl6er@dl6er.de>
2024-05-21 19:59:51 +02:00