summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-02-08 18:41:06 +0100
committerChristian Poessinger <christian@poessinger.com>2019-03-17 15:59:31 +0100
commitade3a18ca2d967ac9565115c1b57b44aba85a19b (patch)
tree2f7580015a6901b0822c6325af330d1c066646a4
parent968a63c831712112897b6b7354ac18f0349950ea (diff)
downloadvyatta-cfg-firewall-ade3a18ca2d967ac9565115c1b57b44aba85a19b.tar.gz
vyatta-cfg-firewall-ade3a18ca2d967ac9565115c1b57b44aba85a19b.zip
Revert "Bug #T171 fix Open Task T171 Unable to Delte Rule"
This reverts commit d1164b989295016436f20caa709603ec5d85a4d3. (cherry picked from commit 5499f86a9b6702ce1e76d994402299fce3bbbc47)
-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;
+ }
}
}