fix(dnsguard): Fix detector status UCI path in RPCD handler
The handler was looking for dns-guard.detector_${det}.enabled but
UCI config uses dns-guard.${det}.enabled (without detector_ prefix).
This caused all detectors to show as Disabled in the dashboard.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7f3260c025
commit
2c21226043
@ -295,7 +295,7 @@ method_guard_status() {
|
|||||||
# Detector status
|
# Detector status
|
||||||
json_add_object "detectors"
|
json_add_object "detectors"
|
||||||
for det in dga tunneling rate_anomaly known_bad tld_anomaly; do
|
for det in dga tunneling rate_anomaly known_bad tld_anomaly; do
|
||||||
local det_enabled=$(uci -q get "dns-guard.detector_${det}.enabled")
|
local det_enabled=$(uci -q get "dns-guard.\${det}.enabled")
|
||||||
json_add_boolean "$det" "${det_enabled:-0}"
|
json_add_boolean "$det" "${det_enabled:-0}"
|
||||||
done
|
done
|
||||||
json_close_object
|
json_close_object
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user