From 8cad8114cf68182b6202f20583da67b050e9c493 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 19 Feb 2022 09:35:20 +0100 Subject: [PATCH] Always re-read FTL config file at start of settings page to refresh old config data from before running the savesettings.php code Signed-off-by: DL6ER --- scripts/pi-hole/php/FTL.php | 4 ++-- settings.php | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/pi-hole/php/FTL.php b/scripts/pi-hole/php/FTL.php index 958ac7bed..4ceba32c3 100644 --- a/scripts/pi-hole/php/FTL.php +++ b/scripts/pi-hole/php/FTL.php @@ -8,12 +8,12 @@ $piholeFTLConfFile = "/etc/pihole/pihole-FTL.conf"; -function piholeFTLConfig() +function piholeFTLConfig($force=false) { static $piholeFTLConfig; global $piholeFTLConfFile; - if(isset($piholeFTLConfig)) + if(isset($piholeFTLConfig) && !$force) { return $piholeFTLConfig; } diff --git a/settings.php b/settings.php index b2c7dd86b..1b006998d 100644 --- a/settings.php +++ b/settings.php @@ -10,7 +10,7 @@ require_once "scripts/pi-hole/php/FTL.php"; // Reread ini file as things might have been changed $setupVars = parse_ini_file("/etc/pihole/setupVars.conf"); -$piholeFTLConf = piholeFTLConfig(); +$piholeFTLConf = piholeFTLConfig(true); // Handling of PHP internal errors $last_error = error_get_last(); @@ -957,7 +957,10 @@ function convertseconds($argument) It is important to note that rate-limiting is happening on a per-client basis. Other clients can continue to use FTL while rate-limited clients are short-circuited at the same time.

-

Rate-limiting may be disabled altogether by setting both values to zero.

+

Rate-limiting may be disabled altogether by setting both + values to zero. See + our documentation + for further details.


Conditional forwarding

If not configured as your DHCP server, Pi-hole typically won't be able to