summaryrefslogtreecommitdiff
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
parente0754f608b789efd932588b63771e1300cc49ec2 (diff)
downloadvyatta-cfg-firewall-ded7c15145465665858a891376f8ae77bbd8332a.tar.gz
vyatta-cfg-firewall-ded7c15145465665858a891376f8ae77bbd8332a.zip
Change firewall default-policy to default-action.
-rw-r--r--lib/Vyatta/IpTables/Rule.pm2
-rwxr-xr-xscripts/firewall/vyatta-firewall.pl8
-rw-r--r--templates/firewall/ipv6-modify/node.tag/default-action/node.def (renamed from templates/firewall/ipv6-modify/node.tag/default-policy/node.def)2
-rw-r--r--templates/firewall/ipv6-name/node.tag/default-action/node.def (renamed from templates/firewall/ipv6-name/node.tag/default-policy/node.def)2
-rw-r--r--templates/firewall/modify/node.tag/default-action/node.def (renamed from templates/firewall/modify/node.tag/default-policy/node.def)2
-rw-r--r--templates/firewall/name/node.tag/default-action/node.def (renamed from templates/firewall/name/node.tag/default-policy/node.def)2
6 files changed, 9 insertions, 9 deletions
diff --git a/lib/Vyatta/IpTables/Rule.pm b/lib/Vyatta/IpTables/Rule.pm
index 8c78613..49f28e8 100644
--- a/lib/Vyatta/IpTables/Rule.pm
+++ b/lib/Vyatta/IpTables/Rule.pm
@@ -131,7 +131,7 @@ sub setupDummy {
# set the default policy
my $config = new Vyatta::Config;
$config->setLevel("$level");
- my $policy = $config->returnOrigValue('default-policy');
+ my $policy = $config->returnOrigValue('default-action');
$policy = 'drop' if ! defined $policy;
$self->{_action} = $policy;
}
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);
diff --git a/templates/firewall/ipv6-modify/node.tag/default-policy/node.def b/templates/firewall/ipv6-modify/node.tag/default-action/node.def
index d88d82f..0ea4202 100644
--- a/templates/firewall/ipv6-modify/node.tag/default-policy/node.def
+++ b/templates/firewall/ipv6-modify/node.tag/default-action/node.def
@@ -1,6 +1,6 @@
type: txt
-help: Set firewall default-policy
+help: Set firewall default-action
default: "drop"
diff --git a/templates/firewall/ipv6-name/node.tag/default-policy/node.def b/templates/firewall/ipv6-name/node.tag/default-action/node.def
index e335e94..f4c0e1f 100644
--- a/templates/firewall/ipv6-name/node.tag/default-policy/node.def
+++ b/templates/firewall/ipv6-name/node.tag/default-action/node.def
@@ -1,6 +1,6 @@
type: txt
-help: Set firewall default-policy
+help: Set firewall default-action
default: "drop"
diff --git a/templates/firewall/modify/node.tag/default-policy/node.def b/templates/firewall/modify/node.tag/default-action/node.def
index d88d82f..0ea4202 100644
--- a/templates/firewall/modify/node.tag/default-policy/node.def
+++ b/templates/firewall/modify/node.tag/default-action/node.def
@@ -1,6 +1,6 @@
type: txt
-help: Set firewall default-policy
+help: Set firewall default-action
default: "drop"
diff --git a/templates/firewall/name/node.tag/default-policy/node.def b/templates/firewall/name/node.tag/default-action/node.def
index e335e94..f4c0e1f 100644
--- a/templates/firewall/name/node.tag/default-policy/node.def
+++ b/templates/firewall/name/node.tag/default-action/node.def
@@ -1,6 +1,6 @@
type: txt
-help: Set firewall default-policy
+help: Set firewall default-action
default: "drop"