summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-06-02 18:47:41 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-06-02 18:49:48 -0700
commitded7c15145465665858a891376f8ae77bbd8332a (patch)
tree6d463fefd1a8324b161ed3d395dc77fcb7b9e5a4 /scripts
parente0754f608b789efd932588b63771e1300cc49ec2 (diff)
downloadvyatta-cfg-firewall-ded7c15145465665858a891376f8ae77bbd8332a.tar.gz
vyatta-cfg-firewall-ded7c15145465665858a891376f8ae77bbd8332a.zip
Change firewall default-policy to default-action.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/firewall/vyatta-firewall.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/firewall/vyatta-firewall.pl b/scripts/firewall/vyatta-firewall.pl
index 08da99d..9cfe279 100755
--- a/scripts/firewall/vyatta-firewall.pl
+++ b/scripts/firewall/vyatta-firewall.pl
@@ -321,9 +321,9 @@ sub update_rules {
my $chain_stateful = 0;
$config->setLevel("firewall $tree $name");
- my $policy = $config->returnValue('default-policy');
+ my $policy = $config->returnValue('default-action');
$policy = 'drop' if ! defined $policy;
- my $old_policy = $config->returnOrigValue('default-policy');
+ my $old_policy = $config->returnOrigValue('default-action');
log_msg "update_rules: [$name] = [$nodes{$name}], policy [$policy]\n";
if ($nodes{$name} eq 'static') {
@@ -705,7 +705,7 @@ sub set_default_policy {
$policy = 'drop' if ! defined $policy;
log_msg("set_default_policy($iptables_cmd, $table, $chain, $policy)\n");
my $target = $policy_hash{$policy};
- my $comment = "-m comment --comment \"$chain-1025 default-policy $policy\"";
+ my $comment = "-m comment --comment \"$chain-1025 default-action $policy\"";
run_cmd("$iptables_cmd -t $table -A $chain $comment -j $target", 1, 1);
}
@@ -726,7 +726,7 @@ sub change_default_policy {
$policy = 'drop' if ! defined $policy;
log_msg("change_default_policy($iptables_cmd, $table, $chain, $policy)\n");
my $target = $policy_hash{$policy};
- my $comment = "-m comment --comment \"$chain-1025 default-policy $policy\"";
+ my $comment = "-m comment --comment \"$chain-1025 default-action $policy\"";
my $default_rule = count_iptables_rules($table, $chain, $iptables_cmd);
run_cmd("$iptables_cmd -t $table -A $chain $comment -j $target", 1, 1);
run_cmd("$iptables_cmd -t $table -D $chain $default_rule", 1, 1);