[pve-devel] [PATCH] test if BRIDGEFW-OUT and BRIDGEFW-IN exist
Alexandre Derumier
aderumier at odiso.com
Mon Feb 17 13:50:26 CET 2014
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Firewall.pm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/PVE/Firewall.pm b/PVE/Firewall.pm
index 0c1a37a..4b14871 100644
--- a/PVE/Firewall.pm
+++ b/PVE/Firewall.pm
@@ -277,8 +277,13 @@ sub ruleset_insertrule {
sub generate_bridge_chains {
my ($ruleset, $bridge) = @_;
- ruleset_create_chain($ruleset, "BRIDGEFW-IN");
- ruleset_create_chain($ruleset, "BRIDGEFW-OUT");
+ if (!ruleset_chain_exist($ruleset, "BRIDGEFW-IN")){
+ ruleset_create_chain($ruleset, "BRIDGEFW-IN");
+ }
+
+ if (!ruleset_chain_exist($ruleset, "BRIDGEFW-OUT")){
+ ruleset_create_chain($ruleset, "BRIDGEFW-OUT");
+ }
if (!ruleset_chain_exist($ruleset, "proxmoxfw-FORWARD")){
ruleset_create_chain($ruleset, "proxmoxfw-FORWARD");
@@ -618,7 +623,6 @@ sub compile {
generate_tap_rules_direction($ruleset, $iface, $netid, $rules->{$vmid}->{out}, $bridge, 'OUT');
}
}
-
return $ruleset;
}
--
1.7.10.4
More information about the pve-devel
mailing list