diff options
Diffstat (limited to 'templates/interfaces/tunnel')
5 files changed, 19 insertions, 7 deletions
diff --git a/templates/interfaces/tunnel/node.def b/templates/interfaces/tunnel/node.def index 720bf64f..1e50a1dd 100644 --- a/templates/interfaces/tunnel/node.def +++ b/templates/interfaces/tunnel/node.def @@ -63,8 +63,11 @@ create: 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(../@)" diff --git a/templates/interfaces/tunnel/node.tag/dhcp-interface/node.def b/templates/interfaces/tunnel/node.tag/dhcp-interface/node.def index 60fbae34..de0450d7 100644 --- a/templates/interfaces/tunnel/node.tag/dhcp-interface/node.def +++ b/templates/interfaces/tunnel/node.tag/dhcp-interface/node.def @@ -2,7 +2,7 @@ type: txt help: DHCP interface that supplies the local IP address for this tunnel allowed: local -a array ; - array=( /var/lib/dhcp3/eth* /var/lib/dhcp3/br* /var/lib/dhcp3/bond* ) ; + array=( /var/lib/dhcp/eth* /var/lib/dhcp/br* /var/lib/dhcp/bond* ) ; echo -n ${array[@]##*/} create: sudo /opt/vyatta/sbin/vyatta-update-tunnel.pl --interface=$VAR(@) --tunnel=$VAR(../@) --option=create diff --git a/templates/interfaces/tunnel/node.tag/local-ip/node.def b/templates/interfaces/tunnel/node.tag/local-ip/node.def index 03d134e9..4a1cbc15 100644 --- a/templates/interfaces/tunnel/node.tag/local-ip/node.def +++ b/templates/interfaces/tunnel/node.tag/local-ip/node.def @@ -17,8 +17,7 @@ update:if ! /opt/vyatta/sbin/local_ip $VAR(@) sudo ip tunnel cha $VAR(../@) local $VAR(@) if [ -e "/opt/vyatta/sbin/dmvpn-config.pl" ]; then sudo /opt/vyatta/sbin/dmvpn-config.pl \ - --config_file='/etc/dmvpn.conf' \ - --secrets_file='/etc/dmvpn.secrets' \ + --config_file='/etc/swanctl/swanctl.conf' \ --init_script='/etc/init.d/ipsec' \ --tunnel_context --tun_id=$VAR(../@) || exit 1 fi diff --git a/templates/interfaces/tunnel/node.tag/parameters/ip/key/node.def b/templates/interfaces/tunnel/node.tag/parameters/ip/key/node.def index b9ed181e..1142d2de 100644 --- a/templates/interfaces/tunnel/node.tag/parameters/ip/key/node.def +++ b/templates/interfaces/tunnel/node.tag/parameters/ip/key/node.def @@ -1,8 +1,8 @@ type: u32 help: Tunnel key -syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 999999; \ - "Must be between 0-999999 for $VAR(../../../@)" -val_help: u32:0-999999; Tunnel key +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4294967295; \ + "Must be between 0-4294967295 for $VAR(../../../@)" +val_help: u32:0-4294967295; Tunnel key syntax:expression: exec " \ if [ -n \"`ip tunnel show $VAR(../../../@) | grep $VAR(../../../@) `\" ]; then \ |