Исправлен drift-check host firewall для established/related, добавлены тесты и trim policy в status

This commit is contained in:
2026-05-11 18:54:15 +05:00
parent 36600c0a5a
commit 640178a592
2 changed files with 78 additions and 5 deletions
+8 -2
View File
@@ -175,7 +175,10 @@ pub fn print_status(cfg: &Config) -> anyhow::Result<()> {
);
println!(
" input_policy: {}",
cfg.host_firewall.default_input_policy.to_ascii_lowercase()
cfg.host_firewall
.default_input_policy
.trim()
.to_ascii_lowercase()
);
if cfg.host_firewall.enabled {
match firewall::host_firewall_drift_reason(cfg) {
@@ -284,7 +287,10 @@ fn print_degraded_sections(cfg: &Config) -> anyhow::Result<()> {
);
println!(
" input_policy: {}",
cfg.host_firewall.default_input_policy.to_ascii_lowercase()
cfg.host_firewall
.default_input_policy
.trim()
.to_ascii_lowercase()
);
if cfg.host_firewall.enabled {
match firewall::host_firewall_drift_reason(cfg) {