Blob Blame History Raw
From 9f9a4762aa18d8ef399fc7e45c72a2fb1043bbc2 Mon Sep 17 00:00:00 2001
From: Eric Garver <eric@garver.life>
Date: Fri, 30 Aug 2019 14:09:11 -0400
Subject: [PATCH 97/99] fix: direct: removeRules() not removing all rules in
 chain

Fixes: 174005b15059 ("fix: direct: removeRules() was mistakenly removing all rules")
(cherry picked from commit 083d6527ad9c60442e424172e223b65132bc6d17)
(cherry picked from commit 55a639aed7a8b5f2d77d39b26dd78f51b20100ed)
---
 src/firewall/server/config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/firewall/server/config.py b/src/firewall/server/config.py
index b2cebea9b4be..cd640ba881ca 100644
--- a/src/firewall/server/config.py
+++ b/src/firewall/server/config.py
@@ -1367,7 +1367,7 @@ class FirewallDConfig(slip.dbus.service.Object):
                    (ipv, table, chain, ))
         self.accessCheck(sender)
         settings = list(self.getSettings())
-        for rule in settings[1]:
+        for rule in settings[1][:]:
             if (ipv, table, chain) == (rule[0], rule[1], rule[2]):
                 settings[1].remove(rule)
         self.update(tuple(settings))
-- 
2.20.1