summaryrefslogtreecommitdiff
path: root/gen-interface-templates.pl
diff options
context:
space:
mode:
authorSaurabh Mohan <saurabh.mohan@vyatta.com>2012-08-09 13:28:36 -0700
committerSaurabh Mohan <saurabh.mohan@vyatta.com>2012-08-09 13:28:36 -0700
commit70407f73496ff0533826714a460b311ad666f850 (patch)
treed7d1b0a22097f1083e2fb7fd6e63c21e68cd7d2a /gen-interface-templates.pl
parent221e4070c648d4a1786a61a290e95a0388a9fe85 (diff)
downloadvyatta-cfg-firewall-70407f73496ff0533826714a460b311ad666f850.tar.gz
vyatta-cfg-firewall-70407f73496ff0533826714a460b311ad666f850.zip
Bugfix 8217: VTI: add firewall cfg commands under interfaces vti
Add support for interface vti for cfg commands for firewall.
Diffstat (limited to 'gen-interface-templates.pl')
-rwxr-xr-xgen-interface-templates.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/gen-interface-templates.pl b/gen-interface-templates.pl
index 3f7a232..9a9dc41 100755
--- a/gen-interface-templates.pl
+++ b/gen-interface-templates.pl
@@ -55,6 +55,7 @@ my %interface_hash = (
'input/node.tag' => '$VAR(../../../@)',
'tunnel/node.tag' => '$VAR(../../../@)',
+ 'vti/node.tag' => '$VAR(../../../@)',
'bridge/node.tag' => '$VAR(../../../@)',
'openvpn/node.tag' => '$VAR(../../../@)',
@@ -70,6 +71,12 @@ my %interface_hash = (
'wirelessmodem/node.tag' => '$VAR(../../../@)',
);
+# Hash table to check if the priority needs to set @ root
+# of the node.def which is generated.
+my %interface_prio = (
+ 'vti/node.tag' => '901',
+);
+
# The subdirectory where the generated templates will go
my $template_subdir = "generated-templates/interfaces";
@@ -102,6 +109,9 @@ sub gen_firewall_template {
open my $tp, '>', "$path/$node_file"
or die "Can't create $path/$node_file: $!";
+ if (exists $interface_prio{ $if_tree }) {
+ print $tp "priority: $interface_prio{ $if_tree }\n";
+ }
print $tp "help: Firewall options\n";
close $tp
or die "Can't write $path/$node_file: $!";