summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bays <robert@vyatta.com>2012-09-02 17:45:41 -0700
committerRobert Bays <robert@vyatta.com>2012-09-02 17:45:41 -0700
commit9da0929d8fe619e7a50f6507b488600080ffe1b5 (patch)
treeb37897cf8c9af9ff800b5b816533af92afae55dc
parent71381582340b72ac57f18f55f1e7a3d68e04a480 (diff)
parent41563446646940ded446e480a26554f7b6b2d0b9 (diff)
downloadvyatta-cfg-quagga-pbr.tar.gz
vyatta-cfg-quagga-pbr.zip
Merge branch 'pacifica' of http://git.vyatta.com/vyatta-cfg-quagga into pbrpbr
-rw-r--r--debian/changelog6
-rw-r--r--debian/vyatta-cfg-quagga.install1
-rwxr-xr-xgen-interface-templates.pl25
3 files changed, 29 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 7c9cb40b..752cdfde 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+vyatta-cfg-quagga (0.18.153) unstable; urgency=low
+
+ * Bugfix 8217: VTI: add routing cfg commands under interfaces vti
+
+ -- Saurabh Mohan <saurabh@vyatta.com> Thu, 09 Aug 2012 13:27:17 -0700
+
vyatta-cfg-quagga (0.18.152) unstable; urgency=low
* Warn user if both gateway-address and static default route are set
diff --git a/debian/vyatta-cfg-quagga.install b/debian/vyatta-cfg-quagga.install
index a344ac5e..eabb7e56 100644
--- a/debian/vyatta-cfg-quagga.install
+++ b/debian/vyatta-cfg-quagga.install
@@ -11,5 +11,6 @@ opt/vyatta/share/vyatta-cfg/templates/interfaces/loopback
opt/vyatta/share/vyatta-cfg/templates/interfaces/openvpn
opt/vyatta/share/vyatta-cfg/templates/interfaces/pseudo-ethernet
opt/vyatta/share/vyatta-cfg/templates/interfaces/tunnel
+opt/vyatta/share/vyatta-cfg/templates/interfaces/vti
opt/vyatta/share/vyatta-cfg/templates/interfaces/wireless
opt/vyatta/share/vyatta-cfg/templates/interfaces/wirelessmodem
diff --git a/gen-interface-templates.pl b/gen-interface-templates.pl
index 8cd074ad..48220321 100755
--- a/gen-interface-templates.pl
+++ b/gen-interface-templates.pl
@@ -41,6 +41,7 @@ my %interface_hash = (
'bonding/node.tag' => '$VAR(@)',
'bonding/node.tag/vif/node.tag' => '$VAR(../@).$VAR(@)',
'tunnel/node.tag' => '$VAR(@)',
+ 'vti/node.tag' => '$VAR(@)',
'bridge/node.tag' => '$VAR(@)',
'openvpn/node.tag' => '$VAR(@)',
'wirelessmodem/node.tag' => '$VAR(@)',
@@ -59,8 +60,14 @@ my %interface_hash = (
'dataplane/node.tag/vif/node.tag' => '$VAR(../@).$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',
+);
+
sub gen_template {
- my ( $inpath, $outpath, $ifname ) = @_;
+ my ( $inpath, $outpath, $ifname, $gen_prio, $prio, $depth ) = @_;
print $outpath, "\n" if ($debug);
opendir my $d, $inpath
@@ -80,7 +87,7 @@ sub gen_template {
or mkdir($out)
or die "Can't create $out: $!";
- gen_template( $in, $out, $subif );
+ gen_template( $in, $out, $subif, $gen_prio, $prio, $depth+1);
next;
}
@@ -88,6 +95,10 @@ sub gen_template {
open my $inf, '<', $in or die "Can't open $in: $!";
open my $outf, '>', $out or die "Can't open $out: $!";
+ # For the top node.tag create the priority tag.
+ if ($name eq 'node.def' && $gen_prio == 1 && $depth <= 1) {
+ print $outf "priority: $prio\n";
+ }
while ( my $line = <$inf> ) {
$line =~ s#\$IFNAME#$ifname#;
print $outf $line;
@@ -120,5 +131,13 @@ foreach my $if_tree ( keys %interface_hash ) {
or mkdir_p($outpath)
or die "Can't create $outpath:$!";
- gen_template( $inpath, $outpath, $interface_hash{$if_tree} );
+ my $gen_prio = 0;
+ my $prio = 0;
+ $gen_prio = 1 if (exists $interface_prio{ $if_tree });
+ if ($gen_prio == 1) {
+ $prio = $interface_prio{ $if_tree };
+ }
+
+ gen_template( $inpath, $outpath, $interface_hash{$if_tree},
+ $gen_prio, $prio, 0 );
}