From 70407f73496ff0533826714a460b311ad666f850 Mon Sep 17 00:00:00 2001 From: Saurabh Mohan Date: Thu, 9 Aug 2012 13:28:36 -0700 Subject: Bugfix 8217: VTI: add firewall cfg commands under interfaces vti Add support for interface vti for cfg commands for firewall. --- gen-interface-templates.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gen-interface-templates.pl') 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: $!"; -- cgit v1.2.3