Blame SOURCES/0070-fix-direct-removeRules-was-mistakenly-removing-all-r.patch
|
|
136e2c |
From f8fdec2da8244ceb9d9fafcfa227c939b9f1976a Mon Sep 17 00:00:00 2001
|
|
|
792c82 |
From: Eric Garver <eric@garver.life>
|
|
|
792c82 |
Date: Fri, 26 Jul 2019 13:32:44 -0400
|
|
|
136e2c |
Subject: [PATCH 70/73] fix: direct: removeRules() was mistakenly removing all
|
|
|
792c82 |
rules
|
|
|
792c82 |
|
|
|
792c82 |
Only remove the rules that match the specified criteria (ipv, table,
|
|
|
792c82 |
chain).
|
|
|
792c82 |
|
|
|
792c82 |
Fixes: #385
|
|
|
792c82 |
Fixes: rhbz 1723610
|
|
|
792c82 |
(cherry picked from commit 174005b15059db054b2f8dcf3b35c23fcbaf44ec)
|
|
|
792c82 |
(cherry picked from commit 5b796871894bc2f4f973ef11dc9233b4d391dd63)
|
|
|
792c82 |
---
|
|
|
792c82 |
src/firewall/server/config.py | 4 +++-
|
|
|
792c82 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
792c82 |
|
|
|
792c82 |
diff --git a/src/firewall/server/config.py b/src/firewall/server/config.py
|
|
|
792c82 |
index 011052a9cabf..b2cebea9b4be 100644
|
|
|
792c82 |
--- a/src/firewall/server/config.py
|
|
|
792c82 |
+++ b/src/firewall/server/config.py
|
|
|
792c82 |
@@ -1367,7 +1367,9 @@ class FirewallDConfig(slip.dbus.service.Object):
|
|
|
792c82 |
(ipv, table, chain, ))
|
|
|
792c82 |
self.accessCheck(sender)
|
|
|
792c82 |
settings = list(self.getSettings())
|
|
|
792c82 |
- settings[1] = []
|
|
|
792c82 |
+ for rule in settings[1]:
|
|
|
792c82 |
+ if (ipv, table, chain) == (rule[0], rule[1], rule[2]):
|
|
|
792c82 |
+ settings[1].remove(rule)
|
|
|
792c82 |
self.update(tuple(settings))
|
|
|
792c82 |
|
|
|
792c82 |
@dbus_service_method(config.dbus.DBUS_INTERFACE_CONFIG_DIRECT,
|
|
|
792c82 |
--
|
|
|
136e2c |
2.20.1
|
|
|
792c82 |
|