From 6ebfbfbe94bd06e8d70c10976de0796fafc4ffda Mon Sep 17 00:00:00 2001 From: Ilia Date: Mon, 11 Apr 2022 20:32:25 +0300 Subject: [PATCH] Unless firewalld restart Fail2ban bans break and fail to work --- firewalld/firewalld-lib.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firewalld/firewalld-lib.pl b/firewalld/firewalld-lib.pl index dcca5cd38..12cde073b 100644 --- a/firewalld/firewalld-lib.pl +++ b/firewalld/firewalld-lib.pl @@ -230,8 +230,9 @@ return ($w{'port'}, $w{'proto'}, $w{'toport'}, $w{'toaddr'}); # Make the current saved config active sub apply_firewalld { -my $out = &backquote_logged("$config{'firewall_cmd'} --reload 2>&1"); -return $? ? $out : undef; +&foreign_require("init"); +my ($ok, $err) = &init::restart_action($config{'init_name'}); +return $ok ? undef : $err; } # stop_firewalld()