diff options
author | Seamus Caveney <scv@brinstar.org> | 2016-01-26 17:29:00 -0500 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2016-01-26 17:41:28 -0500 |
commit | 0d8e75e2e808ccf366a1527647a6353c09d92237 (patch) | |
tree | 8412615b1ff60357d7d3690265e09faea5d7c332 | |
parent | 2f9b0ecaf33c8598dc1a74ac0fb4f34abaad97cd (diff) | |
download | vyatta-cfg-system-0d8e75e2e808ccf366a1527647a6353c09d92237.tar.gz vyatta-cfg-system-0d8e75e2e808ccf366a1527647a6353c09d92237.zip |
vyatta-cfg-system: add support for 6rd tunnel interfaces
-rw-r--r-- | templates/interfaces/tunnel/node.def | 3 | ||||
-rw-r--r-- | templates/interfaces/tunnel/node.tag/6rd-prefix/node.def | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def index 5fbe205e..720bf64f 100644 --- a/templates/interfaces/tunnel/node.def +++ b/templates/interfaces/tunnel/node.def @@ -62,6 +62,9 @@ create: 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 + ip tunnel add $VAR(@) remote $VAR(./remote-ip/@) mode sit + ip tunnel 6rd dev $VAR(@) 6rd-prefix $VAR(./6rd-prefix/@) 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-prefix/node.def b/templates/interfaces/tunnel/node.tag/6rd-prefix/node.def new file mode 100644 index 00000000..7e899d5d --- /dev/null +++ b/templates/interfaces/tunnel/node.tag/6rd-prefix/node.def @@ -0,0 +1,10 @@ +multi: +type: ipv6net +val_help: ipv6net; IPv6 address and prefix length +help: 6rd network prefix + +syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" + +create:expression: "true" +update:expression: "false" ; \ + "6rd-prefix can only be modified at tunnel creation for $VAR(../@)" |