diff options
author | Seamus Caveney <scv@brinstar.org> | 2016-01-27 08:58:52 -0500 |
---|---|---|
committer | Seamus Caveney <scv@brinstar.org> | 2016-01-27 08:58:52 -0500 |
commit | 1415c7fb591cc210a49b46453c4968fc41894b47 (patch) | |
tree | 97a3010ad224a4aa0f9a90e58d3d8f7a5066083d | |
parent | 8b7275209398e7c8e19c7cf45079bd883e86549c (diff) | |
download | vyatta-cfg-system-1415c7fb591cc210a49b46453c4968fc41894b47.tar.gz vyatta-cfg-system-1415c7fb591cc210a49b46453c4968fc41894b47.zip |
vyatta-cfg-system: add 6rd-relay-prefix option to support providers using ipv6 networks larger than /32
-rw-r--r-- | templates/interfaces/tunnel/node.def | 9 | ||||
-rw-r--r-- | templates/interfaces/tunnel/node.tag/6rd-relay-prefix/node.def | 10 |
2 files changed, 16 insertions, 3 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def index 720bf64f..bd2c4255 100644 --- a/templates/interfaces/tunnel/node.def +++ b/templates/interfaces/tunnel/node.def @@ -57,14 +57,17 @@ create: else TTL="ttl 255" fi - if [ -n "$VAR(./parameters/ip/key/@)" ]; then + if [ -n "$VAR(./parameters/ip/key/@)" ]; then KEY="key $VAR(./parameters/ip/key/@)" - fi + fi if [ "$VAR(./encapsulation/@)" == "gre" ] && [ -z $VAR(./remote-ip/) ]; then ip tunnel add $VAR(@) local $LIP mode gre $KEY $TTL $TOS elif [ "$VAR(./encapsulation/@)" == "sit" ] && [ -n "$VAR(./6rd-prefix/@)" ]; then + if [ -n "$VAR(./6rd-relay-prefix/@)" ]; then + RP="6rd-relay_prefix $VAR(./6rd-relay-prefix/@)" + fi ip tunnel add $VAR(@) remote $VAR(./remote-ip/@) mode sit - ip tunnel 6rd dev $VAR(@) 6rd-prefix $VAR(./6rd-prefix/@) + ip tunnel 6rd dev $VAR(@) 6rd-prefix $VAR(./6rd-prefix/@) $RP else ip tunnel add $VAR(@) local $LIP remote $VAR(./remote-ip/@) mode $VAR(./encapsulation/@) $KEY $TTL $TOS fi diff --git a/templates/interfaces/tunnel/node.tag/6rd-relay-prefix/node.def b/templates/interfaces/tunnel/node.tag/6rd-relay-prefix/node.def new file mode 100644 index 00000000..0f877e2d --- /dev/null +++ b/templates/interfaces/tunnel/node.tag/6rd-relay-prefix/node.def @@ -0,0 +1,10 @@ +multi: +type: ipv4net +val_help: ipv4net; IPv4 prefix of interface for 6rd +help: 6rd relay prefix + +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" + +create:expression: "true" +update:expression: "false" ; \ + "6rd-relay-prefix can only be modified at tunnel creation for $VAR(../@)" |