From 5499f86a9b6702ce1e76d994402299fce3bbbc47 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 8 Feb 2019 18:41:06 +0100 Subject: Revert "Bug #T171 fix Open Task T171 Unable to Delte Rule" This reverts commit d1164b989295016436f20caa709603ec5d85a4d3. --- scripts/firewall/vyatta-firewall.pl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts') 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; + } } } -- cgit v1.2.3