Blame SOURCES/0003-ipXtables-nftables-Fix-object-has-no-attribute-_log_.patch

21c891
From 27c9c0d4c15db0681f550bd5576502ded87da6fa Mon Sep 17 00:00:00 2001
21c891
From: Federico Cuello <fedux@fedux.com.ar>
21c891
Date: Sat, 20 Oct 2018 15:47:28 +0200
21c891
Subject: [PATCH 03/34] ipXtables/nftables: Fix "object has no attribute
21c891
 '_log_denied'"
21c891
21c891
This fixes nftables and ipXtables (when IndividualCalls=yes),
21c891
as _log_denied is not an attribute of the class but a param.
21c891
21c891
(cherry picked from commit 93824072768f989991a11069ac75f1cd3d56ae34)
21c891
(cherry picked from commit 1148e7054b8ef9bbd808fd0fb739fb3204b3265b)
21c891
---
21c891
 src/firewall/core/ipXtables.py | 3 +--
21c891
 src/firewall/core/nftables.py  | 2 +-
21c891
 2 files changed, 2 insertions(+), 3 deletions(-)
21c891
21c891
diff --git a/src/firewall/core/ipXtables.py b/src/firewall/core/ipXtables.py
21c891
index 02a518d2938d..11aebec6e05a 100644
21c891
--- a/src/firewall/core/ipXtables.py
21c891
+++ b/src/firewall/core/ipXtables.py
21c891
@@ -492,8 +492,7 @@ class ip4tables(object):
21c891
             if log_denied == "off":
21c891
                 return ""
21c891
             if log_denied in [ "unicast", "broadcast", "multicast" ]:
21c891
-                rule[i:i+1] = [ "-m", "pkttype", "--pkt-type",
21c891
-                                self._log_denied ]
21c891
+                rule[i:i+1] = [ "-m", "pkttype", "--pkt-type", log_denied ]
21c891
             else:
21c891
                 rule.pop(i)
21c891
 
21c891
diff --git a/src/firewall/core/nftables.py b/src/firewall/core/nftables.py
21c891
index 3c871069f7e6..cd05b2c3137e 100644
21c891
--- a/src/firewall/core/nftables.py
21c891
+++ b/src/firewall/core/nftables.py
21c891
@@ -290,7 +290,7 @@ class nftables(object):
21c891
             if log_denied == "off":
21c891
                 return ""
21c891
             if log_denied in ["unicast", "broadcast", "multicast"]:
21c891
-                rule[i:i+1] = ["pkttype", self._log_denied]
21c891
+                rule[i:i+1] = ["pkttype", log_denied]
21c891
             else:
21c891
                 rule.pop(i)
21c891
 
21c891
-- 
21c891
2.18.0
21c891