diff options
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifup-tunnel | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifup-tunnel b/sysconfig/network-scripts/ifup-tunnel index 5a1df54c..afdfe928 100755 --- a/sysconfig/network-scripts/ifup-tunnel +++ b/sysconfig/network-scripts/ifup-tunnel @@ -47,7 +47,7 @@ IPIP) proto=-4 /sbin/modprobe ipip ;; -IPIP6) +IPIP6|EXTERNAL) MODE=ipip6 proto=-6 /sbin/modprobe ip6_tunnel @@ -66,10 +66,14 @@ fi # Create the tunnel # The outer addresses are those of the underlying (public) network. -/sbin/ip $proto tunnel add "$DEVICE" mode "$MODE" \ - ${MY_OUTER_IPADDR:+local "$MY_OUTER_IPADDR"} \ - ${PEER_OUTER_IPADDR:+remote "$PEER_OUTER_IPADDR"} \ - ${KEY:+key "$KEY"} ${TTL:+ttl "$TTL"} +if [ "$TYPE" = 'EXTERNAL' ]; then + /sbin/ip link add "$DEVICE" type ip6tnl external +else + /sbin/ip $proto tunnel add "$DEVICE" mode "$MODE" \ + ${MY_OUTER_IPADDR:+local "$MY_OUTER_IPADDR"} \ + ${PEER_OUTER_IPADDR:+remote "$PEER_OUTER_IPADDR"} \ + ${KEY:+key "$KEY"} ${TTL:+ttl "$TTL"} +fi if [ -n "$MTU" ]; then /sbin/ip link set "$DEVICE" mtu "$MTU" |