Blame SOURCES/0040-fix-propagate-exception-if-backend-fails-with-Indivi.patch
|
|
136e2c |
From 1254cf169249fa75ff9838df48402c936e706426 Mon Sep 17 00:00:00 2001
|
|
|
136e2c |
From: Eric Garver <eric@garver.life>
|
|
|
136e2c |
Date: Thu, 2 May 2019 11:47:25 -0400
|
|
|
136e2c |
Subject: [PATCH 40/73] fix: propagate exception if backend fails with
|
|
|
136e2c |
IndividualCalls=yes
|
|
|
136e2c |
|
|
|
136e2c |
They were being logged, but not propagated. They need to be propagated
|
|
|
136e2c |
so things like reload() can enter FAILED state.
|
|
|
136e2c |
|
|
|
136e2c |
(cherry picked from commit 360d40a075f5b72e93d941297cc0badf036e53e3)
|
|
|
136e2c |
(cherry picked from commit fba166f79f1fac5e94a97c18369f36d13cab1bd6)
|
|
|
136e2c |
---
|
|
|
136e2c |
src/firewall/core/fw.py | 3 +--
|
|
|
136e2c |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
136e2c |
|
|
|
136e2c |
diff --git a/src/firewall/core/fw.py b/src/firewall/core/fw.py
|
|
|
136e2c |
index 876c43392b1b..114d41090042 100644
|
|
|
136e2c |
--- a/src/firewall/core/fw.py
|
|
|
136e2c |
+++ b/src/firewall/core/fw.py
|
|
|
136e2c |
@@ -882,7 +882,6 @@ class Firewall(object):
|
|
|
136e2c |
backend.set_rule(rule, self._log_denied)
|
|
|
136e2c |
except Exception as msg:
|
|
|
136e2c |
log.debug1(traceback.format_exc())
|
|
|
136e2c |
- log.error("Failed to apply rules. A firewall reload might solve the issue if the firewall has been modified using ip*tables or ebtables.")
|
|
|
136e2c |
log.error(msg)
|
|
|
136e2c |
for rule in reversed(_rules[:i]):
|
|
|
136e2c |
try:
|
|
|
136e2c |
@@ -890,7 +889,7 @@ class Firewall(object):
|
|
|
136e2c |
except Exception:
|
|
|
136e2c |
# ignore errors here
|
|
|
136e2c |
pass
|
|
|
136e2c |
- return False
|
|
|
136e2c |
+ raise msg
|
|
|
136e2c |
return True
|
|
|
136e2c |
else:
|
|
|
136e2c |
return backend.set_rules(_rules, self._log_denied)
|
|
|
136e2c |
--
|
|
|
136e2c |
2.20.1
|
|
|
136e2c |
|