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