diff options
author | Kim Hagen <khagen@multi-development.com> | 2014-08-25 10:21:35 +0200 |
---|---|---|
committer | Kim Hagen <khagen@multi-development.com> | 2014-08-25 10:21:35 +0200 |
commit | 818b4863c1047ce597a72943dc7b4d49b6f0e4dc (patch) | |
tree | 1f330c8e5aaf9e28d9299f99580afd795a72521a | |
parent | c2a31910938e719af0ea23981345fa2acdf97f64 (diff) | |
download | vyos-nhrp-818b4863c1047ce597a72943dc7b4d49b6f0e4dc.tar.gz vyos-nhrp-818b4863c1047ce597a72943dc7b4d49b6f0e4dc.zip |
Add 'dynamic-map' option
3 files changed, 23 insertions, 0 deletions
diff --git a/scripts/vyos-update-nhrp.pl b/scripts/vyos-update-nhrp.pl index 5741eeb..de91173 100644 --- a/scripts/vyos-update-nhrp.pl +++ b/scripts/vyos-update-nhrp.pl @@ -193,6 +193,16 @@ sub tunnel_config { } push(@conf_file, "\n"); } + if ( $tunnel_Config->exists("$tunnel_ID dynamic-map")) { + $type = "#spoke"; + my @dynmaps = $tunnel_Config->listNodes("$tunnel_ID dynamic-map"); + my $dynmap = $dynmaps[0]; + push(@conf_file, " dynamic-map", " $dynmap"); + push(@conf_file, " ", $tunnel_Config->returnValue("$tunnel_ID dynamic-map $dynmap nbma-domain-name")); + 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/dynamic-map/node.def b/templates-cfg/protocols/nhrp/tunnel/node.tag/dynamic-map/node.def new file mode 100644 index 0000000..281b2d5 --- /dev/null +++ b/templates-cfg/protocols/nhrp/tunnel/node.tag/dynamic-map/node.def @@ -0,0 +1,8 @@ +tag: +type: ipv4net +help: Set an HUB tunnel address + +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/dynamic-map/node.tag/nbma-domain-name/node.def b/templates-cfg/protocols/nhrp/tunnel/node.tag/dynamic-map/node.tag/nbma-domain-name/node.def new file mode 100644 index 0000000..c9070a6 --- /dev/null +++ b/templates-cfg/protocols/nhrp/tunnel/node.tag/dynamic-map/node.tag/nbma-domain-name/node.def @@ -0,0 +1,5 @@ +type: txt +help: Set HUB fqdn (nbma-address - fqdn) [REQUIRED] + +comp_help:Possible completions: + <fqdn> Set the external HUB fqdn |