summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/vyos-update-nhrp.pl9
-rw-r--r--templates-cfg/protocols/nhrp/tunnel/node.tag/shortcut-target/node.def8
-rw-r--r--templates-cfg/protocols/nhrp/tunnel/node.tag/shortcut-target/node.tag/holding-time/node.def3
3 files changed, 20 insertions, 0 deletions
diff --git a/scripts/vyos-update-nhrp.pl b/scripts/vyos-update-nhrp.pl
index de91173..7f4d62a 100644
--- a/scripts/vyos-update-nhrp.pl
+++ b/scripts/vyos-update-nhrp.pl
@@ -203,6 +203,15 @@ sub tunnel_config {
unshift(@conf_file, "interface $tunnel_ID $type\n");
push(@conf_file, "\n");
}
+ if ( $tunnel_Config->exists("$tunnel_ID shortcut-target")) {
+ my @starget = $tunnel_Config->listNodes("$tunnel_ID shortcut-target");
+ my $starget = $starget[0];
+ push(@conf_file, " shortcut-target", " $starget");
+ push(@conf_file, " ", $tunnel_Config->returnValue("$tunnel_ID shortcut-target $starget holding-time"));
+ shift(@conf_file);
+ unshift(@conf_file, "interface $tunnel_ID $type\n");
+ push(@conf_file, "\n");
+ }
if ($tunnel_Config->returnValue("$tunnel_ID cisco-authentication") ne "") {
push(@conf_file, " cisco-authentication ", $tunnel_Config->returnValue("$tunnel_ID cisco-authentication") , "\n");
}
diff --git a/templates-cfg/protocols/nhrp/tunnel/node.tag/shortcut-target/node.def b/templates-cfg/protocols/nhrp/tunnel/node.tag/shortcut-target/node.def
new file mode 100644
index 0000000..3b5c2cf
--- /dev/null
+++ b/templates-cfg/protocols/nhrp/tunnel/node.tag/shortcut-target/node.def
@@ -0,0 +1,8 @@
+tag:
+type: ipv4net
+help: Defines an off-NBMA network prefix for which the GRE interface will act as a gateway.
+
+syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)"
+
+comp_help:Possible completions:
+ <x.x.x.x/x> Set the IP address and prefix length
diff --git a/templates-cfg/protocols/nhrp/tunnel/node.tag/shortcut-target/node.tag/holding-time/node.def b/templates-cfg/protocols/nhrp/tunnel/node.tag/shortcut-target/node.tag/holding-time/node.def
new file mode 100644
index 0000000..7dbca6c
--- /dev/null
+++ b/templates-cfg/protocols/nhrp/tunnel/node.tag/shortcut-target/node.tag/holding-time/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: Holding time in seconds
+