DL6ER
015bf0f8a7
Change default value of ntp.sync.rtc.set to false
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-10-18 20:30:56 +02:00
yubiuser
a5cfba2d3d
Amend help text to database.maxDBdays
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2024-10-13 11:46:25 +02:00
Dominik
6c0c875476
Merge pull request #2072 from pi-hole/new/verify
...
Verify FTL binary integrity
2024-10-01 06:56:21 +02:00
DL6ER
8d1394d00e
Simplify text
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-09-30 19:37:04 +02:00
DL6ER
c2a2df8a77
Restart FTL to enforce flushing the cache when dns.piholePTR is changed
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-09-26 18:51:05 +02:00
DL6ER
cdba28e0c5
Add verification CI test
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-09-26 11:57:53 +02:00
Dominik
001db4953b
Merge pull request #2070 from pi-hole/fix/civetweb_lua_issue
...
Fix Civetweb Lua error reporting issue
2024-09-24 00:13:00 -04:00
DL6ER
9de2bbdad4
Make the CI test a bit more complex so we actually get some stack traceback
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-09-23 22:55:33 +02:00
DL6ER
31d0684912
Add CI test for proper Lua backtrace generation
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-09-23 22:37:01 +02:00
yubiuser
c83da0b68e
Update base image and remove purposely added failing test
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2024-09-20 09:16:37 +02:00
yubiuser
75f11f3f4f
Prettify BATS output
...
Signed-off-by: yubiuser <github@yubiuser.dev >
2024-09-19 13:45:49 +02:00
DL6ER
3e090f52c7
Unify query and cache status enums
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-09-14 10:17:20 +02:00
DL6ER
c12c47cf58
Add EDE 15 from upstream => Blocked detection + new query type representing this
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-09-14 10:17:20 +02:00
DL6ER
d67d13303d
Add downstream EDE info for synthesized replies
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-09-14 10:17:14 +02:00
DL6ER
a4eb3adf3e
Remove fixed number of unchanged config files from CI tests. Slow workers may detect more often that the config was not changed than faster ones. This is caused by inotify events arriving delayed and - in general - asynchroneous.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-09-12 22:10:36 +02:00
DL6ER
42b626f36c
Rename dns.cache.upstreamTTL -> dns.cache.upstreamBlockedTTL
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-08-26 21:40:27 +02:00
DL6ER
af1c5b3039
Add new config option dns.cache.upstreamTTL (defaulting to one day) for configuring how long relpies from upstream are cached
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-08-21 20:18:59 +02:00
DL6ER
17b9bfcc34
If multiple records are returned but at least one is a blocked IP address, the entire query should be blocked. This is already the case but this commit adds an explicit CI test for this desired behavior.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-08-21 20:14:51 +02:00
DL6ER
070544bde1
Implement DNS caching for queries blocked upstream (NXDOMAIN + no RA, 0.0.0.0/::, and known Umbrella IP blocking pages) accompanied with suitable CI testing. This change improves handling of externally blocked queries in two ways:
...
1. Once we know the domain is externally blocked, we don't forward it again for the same client (it is currently forwarded each time)
2. We can recognize cache content with the specified addresses/flags as being upstream blocked and don't return them as "OK (cached)" through the API/in the database
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-08-21 20:14:51 +02:00
DL6ER
e5d901a80c
Improve pihole-FTL process concurrency
...
FTL is trying hard to prevent you from starting another instance of itself. It does so by creating a PID file in `/run/pihole-FTL.pid` and checking for its existence. If the file is present, FTL assumes that another instance is already running and exits. It also checks for the existence of the shared memory objects `/dev/shm/FTL-*` and exits if they are present. These checks can be fooled by manually removing the PID file or shared memory objects (needs `root` privileges). This can lead to multiple instances of FTL running at the same time, which can cause various issues. The most commonly seen issue is that, when the first process needs more memory, its original shared memory objects are already gone. Hence, it actually tries to resize the shared memory objects of the second instance which, on the other hand, doesn't expect this and crashes. As the first process was not able to allocate more memory, this process will eventually crash as well.
This commit resolves this by:
1. Improve support for concurrent `pihole-FTL` instances. Even when this continues to be somewhat discouraged, it is now possible to run multiple instances of `pihole-FTL` at the same time. This is achieved by ensuring that we keep the shared memory object file descriptors open as long as the process is running. This way, the shared memory objects are not removed until the process exits. This also means that the shared memory objects are not *hard* removed when they are deleted from the outside of the process (in Linux, a file continues to exist as long as there is at least one open file descriptor pointing to it). A hypothetical second instance of `pihole-FTL` will now be able to create new shared memory objects without interfering with the first instance. This is a more robust solution than the previous one, as it doesn't rely on the existence of the PID file or shared memory objects which might have been removed by external influences.
2. Check for a potential second instance earlier in the code. We move the check to before even trying to create shared memory objects. This way, we can exit early if we detect that another instance is already running. This is a more efficient solution than the previous one, as we don't need to create shared memory objects just to find out that we can't use them.
3. Add an exclusive lock on the shared memory objects. Even when this is not strictly necessary, it is a good practice to prevent other processes from interfering with the shared memory objects. This is especially important on systems which isolate processes from each other and is a safety net in rare cases such aas multiple Docker containers (isolating processes from one another by default) with (incorrectly!) host-mounted shared memory folders. Once they remove the mounting of `dev/shm`, they will again be able to run multiple `pihole-FTL` across multiple containers.
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-08-06 18:40:42 +02:00
DL6ER
64144a960c
Add session.x_forwarded_for property to API sessions
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-24 08:39:44 +02:00
DL6ER
d6bf943be2
Remove webserver.tls.rev_server config option
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-24 08:39:41 +02:00
Dominik
1381fd0104
Merge pull request #2009 from pi-hole/tweak/api_network_info
...
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Add netlink implementation
2024-07-23 18:05:05 +02:00
DL6ER
260456c29a
Implement fully self-contained VALID/BOGUS DNSSEC zones for our CI tests
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-22 14:05:16 +02:00
DL6ER
f07d902802
Merge branch 'development-v6' into tweak/api_network_info
...
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-19 09:47:18 +02:00
DL6ER
307436e67d
Merge branch 'development-v6' into tweak/ntp_delay
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
2024-07-16 12:14:41 +02:00
DL6ER
c91ac40bd2
fail*.dnssec.works changed its configuration from being BOGUS to ABANDONNED and cannot be used any longer for BOGUS testing
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-16 11:24:45 +02:00
DL6ER
c342c60c71
fail*.dnssec.works changed its configuration from being BOGUS to ABANDONNED and cannot be used any longer for BOGUS testing
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-14 16:33:37 +02:00
DL6ER
35166fd00c
Fix a small bug in the API response verifier and ensure we always favor using 64 bit interface statistics if available. The reason is that the legacy statistics use 32 bit conters which overflow every 4 GB of interface traffic
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-14 15:45:29 +02:00
DL6ER
cdeb5e3427
Add which capability is missing in warnings (if applicable). Also reduce chown() code duplication by using a single function for all chown()-activities
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-02 03:48:12 +02:00
DL6ER
0b82825b53
The CI containers may not be able to set the host's time - this is okay
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-01 20:52:57 +02:00
DL6ER
c846b21876
Add new ntp.sync.active boolean to ease disabling of the NTP client. Also move all the RTC properties inside ntp.sync because this is where they apply and where RTC sync can be disabled
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-01 20:22:03 +02:00
DL6ER
4d32ffe13f
Run the NTP test later in the test suite to ensure the NTP server has been started
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-07-01 20:07:04 +02:00
DL6ER
9de4336858
Update expected database schema in CI tests
...
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-30 08:14:35 +02:00
DL6ER
bc96decc04
Merge branch 'development-v6' into new/cli_pw
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-29 21:59:48 +02:00
DL6ER
630b3582f7
Merge branch 'development-v6' into new/cli_pw
2024-06-29 21:53:32 +02:00
DL6ER
e0330a30a4
Merge branch 'development-v6' into new/app_sudo
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-29 21:52:34 +02:00
DL6ER
0278cc1593
Update condig item description as suggested during code review
...
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-29 09:01:38 +02:00
DL6ER
3f7d317b8a
Check capabilities only when user requested updating time time
...
Build, Test, Deploy / smoke-tests (push) Has been cancelled
Codespell / spell-check (push) Has been cancelled
Check for merge conflicts / merge-conflict (push) Has been cancelled
API validation / Node (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-386, , linux/386) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64, , linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-amd64-clang, clang, linux/amd64) (push) Has been cancelled
Build, Test, Deploy / gha (pihole-FTL-riscv64, , linux/riscv64) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-arm64, linux/arm64/v8) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv6, linux/arm/v6) (push) Has been cancelled
Build, Test, Deploy / self-hosted (pihole-FTL-armv7, linux/arm/v7) (push) Has been cancelled
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-27 18:42:56 +02:00
DL6ER
8e63dd99f9
Adjust tests
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-27 17:35:56 +02:00
DL6ER
ab52ea063c
Merge branch 'development-v6' into new/ntp
...
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 15:13:37 +02:00
DL6ER
a5569d54ae
Add CI test for generation and permissions of CLI password file
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-19 22:14:52 +02:00
DL6ER
069cc309b0
Remove webserver.api.localAPIauth option
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-19 22:07:18 +02:00
DL6ER
b74696fc77
Remove webserver.api.searchAPIauth option
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-19 22:05:49 +02:00
DL6ER
784e119892
Add CLI password generation
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-19 22:01:13 +02:00
DL6ER
4f60134200
Improve config description of webserver.api.app_sudo
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-15 11:11:12 +02:00
DL6ER
950fc60ed3
Limit app password permissions by default. Add new app_sudo mode for users to remove this new limitation if they really need to
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-14 19:10:58 +02:00
DL6ER
09a1f6fe5e
Adjust CI tests due to modified NTP error message text
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-13 07:35:47 +02:00
DL6ER
791e3a8097
Add RTC synchronization
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-07 20:01:04 +02:00
Dominik
08f2e37d9f
Apply suggestions from code review
...
Co-authored-by: RD WebDesign <github@rdwebdesign.com.br >
Signed-off-by: Dominik <DL6ER@users.noreply.github.com >
2024-06-06 08:54:31 +02:00