summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-02-08 18:41:06 +0100
committerChristian Poessinger <christian@poessinger.com>2019-02-08 18:42:29 +0100
commit5499f86a9b6702ce1e76d994402299fce3bbbc47 (patch)
treebd15105d1bface11bfa6188acb589e2e76828c18
parent23447bef89a46f44d7544f15c2755d33f38ffd4c (diff)
downloadvyatta-cfg-firewall-5499f86a9b6702ce1e76d994402299fce3bbbc47.tar.gz
vyatta-cfg-firewall-5499f86a9b6702ce1e76d994402299fce3bbbc47.zip
Revert "Bug #T171 fix Open Task T171 Unable to Delte Rule"
This reverts commit d1164b989295016436f20caa709603ec5d85a4d3.
-rwxr-xr-xscripts/firewall/vyatta-firewall.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/firewall/vyatta-firewall.pl b/scripts/firewall/vyatta-firewall.pl
index f770719..c2727cc 100755
--- a/scripts/firewall/vyatta-firewall.pl
+++ b/scripts/firewall/vyatta-firewall.pl
@@ -553,6 +553,12 @@ sub update_rules {
Vyatta::Config::outputError([$tree,$name],"Firewall configuration error: $err_str\n");
exit 1;
}
+ } elsif ("$test_rule_hash{$test_rule}" eq 'deleted') {
+ if (Vyatta::IpTables::Mgr::chain_referenced($table, $name, $iptables_cmd)) {
+ # Disallow deleting a chain if it's still referenced
+ Vyatta::Config::outputError([$tree,$name],"Firewall configuration error: Cannot delete rule set \"$name\" (still in use)\n");
+ exit 1;
+ }
}
}