summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2017-09-14 14:36:36 +0200
committerDaniil Baturin <daniil@baturin.org>2017-09-14 14:36:36 +0200
commitc48f11fa1b0d6a7b196f9750ef82625dea1aba58 (patch)
tree5954c9afb6965703a5b6afc23bc3d0f0212e7dc2
parentc903db0a63b627e1cdfa91ded522c73abb3b0516 (diff)
downloadvyatta-cfg-firewall-c48f11fa1b0d6a7b196f9750ef82625dea1aba58.tar.gz
vyatta-cfg-firewall-c48f11fa1b0d6a7b196f9750ef82625dea1aba58.zip
Revert "Added support for local PBR to gen-interface-policy-templates.pl"
This reverts commit b30b5c66b7d6f4c12c37a642319dd39f8613f74a.
-rwxr-xr-xgen-interface-policy-templates.pl20
1 files changed, 7 insertions, 13 deletions
diff --git a/gen-interface-policy-templates.pl b/gen-interface-policy-templates.pl
index afea8cf..a86c5d6 100755
--- a/gen-interface-policy-templates.pl
+++ b/gen-interface-policy-templates.pl
@@ -107,16 +107,12 @@ sub gen_firewall_template {
#
my %table_help_hash = (
"route" => "IPv4 policy route",
- "local-route" => "IPv4 policy route of local traffic",
"ipv6-route" => "IPv6 policy route",
- "ipv6-local-route" => "IPv6 policy route of local traffic",
);
my %config_association_hash = (
"route" => "\"policy route\"",
- "local-route" => "\"policy local-route\"",
"ipv6-route" => "\"policy ipv6-route\"",
- "ipv6-local-route" => "\"policy ipv6-local-route\"",
);
# Generate the template file at the leaf of the per-interface firewall tree.
@@ -124,10 +120,10 @@ my %config_association_hash = (
# ruleset on an interface for a particular ruleset type and direction.
#
sub gen_template {
- my ( $if_tree, $direction, $table, $if_name ) = @_;
+ my ( $if_tree, $table, $if_name ) = @_;
if ($debug) {
- print "debug: table=$table direction=$direction\n";
+ print "debug: table=$table\n";
}
my $template_dir =
@@ -151,16 +147,16 @@ allowed: local -a params
echo -n "\${params[@]}"
create: ifname=$if_name
sudo /opt/vyatta/sbin/vyatta-firewall.pl --update-interfaces \\
- update \$ifname $direction \$VAR(@) $config_association_hash{$table}
+ update \$ifname in \$VAR(@) $config_association_hash{$table}
update: ifname=$if_name
sudo /opt/vyatta/sbin/vyatta-firewall.pl --update-interfaces \\
- update \$ifname $direction \$VAR(@) $config_association_hash{$table}
+ update \$ifname in \$VAR(@) $config_association_hash{$table}
delete: ifname=$if_name
sudo /opt/vyatta/sbin/vyatta-firewall.pl --update-interfaces \\
- delete \$ifname $direction \$VAR(@) $config_association_hash{$table}
+ delete \$ifname in \$VAR(@) $config_association_hash{$table}
EOF
close $tp
@@ -177,10 +173,8 @@ foreach my $if_tree ( keys %interface_hash ) {
}
gen_firewall_template($if_tree);
- gen_template( $if_tree, "in", "route", $if_name );
- gen_template( $if_tree, "out", "local-route", $if_name );
- gen_template( $if_tree, "in", "ipv6-route", $if_name );
- gen_template( $if_tree, "out", "ipv6-local-route", $if_name );
+ gen_template( $if_tree, "route", $if_name );
+ gen_template( $if_tree, "ipv6-route", $if_name );
}
print "Done.\n";