|
|
136e2c |
From 3e4c68e79f8b654020a9abac14889d7cb34dad75 Mon Sep 17 00:00:00 2001
|
|
|
d25120 |
From: Eric Garver <eric@garver.life>
|
|
|
d25120 |
Date: Fri, 20 Sep 2019 08:47:22 -0400
|
|
|
136e2c |
Subject: [PATCH 107/109] fix: ebtables: don't use tables that aren't available
|
|
|
d25120 |
|
|
|
d25120 |
(cherry picked from commit 53fa559352156ae4c33613e2e45eb5355e1e86b9)
|
|
|
d25120 |
(cherry picked from commit 3b7dd4993f18c9090f3c307fd40919cc8b2616bc)
|
|
|
d25120 |
---
|
|
|
d25120 |
src/firewall/core/ebtables.py | 4 ++++
|
|
|
d25120 |
1 file changed, 4 insertions(+)
|
|
|
d25120 |
|
|
|
d25120 |
diff --git a/src/firewall/core/ebtables.py b/src/firewall/core/ebtables.py
|
|
|
d25120 |
index 65688571ce31..b17e43dadf20 100644
|
|
|
d25120 |
--- a/src/firewall/core/ebtables.py
|
|
|
d25120 |
+++ b/src/firewall/core/ebtables.py
|
|
|
d25120 |
@@ -229,6 +229,8 @@ class ebtables(object):
|
|
|
d25120 |
def build_flush_rules(self):
|
|
|
d25120 |
rules = []
|
|
|
d25120 |
for table in BUILT_IN_CHAINS.keys():
|
|
|
d25120 |
+ if table not in self.get_available_tables():
|
|
|
d25120 |
+ continue
|
|
|
d25120 |
# Flush firewall rules: -F
|
|
|
d25120 |
# Delete firewall chains: -X
|
|
|
d25120 |
# Set counter to zero: -Z
|
|
|
d25120 |
@@ -239,6 +241,8 @@ class ebtables(object):
|
|
|
d25120 |
def build_set_policy_rules(self, policy):
|
|
|
d25120 |
rules = []
|
|
|
d25120 |
for table in BUILT_IN_CHAINS.keys():
|
|
|
d25120 |
+ if table not in self.get_available_tables():
|
|
|
d25120 |
+ continue
|
|
|
d25120 |
for chain in BUILT_IN_CHAINS[table]:
|
|
|
d25120 |
rules.append(["-t", table, "-P", chain, policy])
|
|
|
d25120 |
return rules
|
|
|
d25120 |
--
|
|
|
d25120 |
2.20.1
|
|
|
d25120 |
|