- [ -n "$local4" ] && {
- logger -t "$link" "Starting ..."
-
- # creating the tunnel below will trigger a net subsystem event
- # prevent it from touching or iface by disabling .auto here
- uci_set_state network "$cfg" ifname $link
- uci_set_state network "$cfg" auto 0
-
- # find our local prefix
- local prefix6=$(find_6to4_prefix "$local4")
- local local6="$prefix6::1/16"
-
- logger -t "$link" " * IPv4 address is $local4"
- logger -t "$link" " * IPv6 address is $local6"
- ip tunnel add $link mode sit remote any local $local4 ttl ${ttl:-64}
- ip link set $link up
- ip link set mtu ${mtu:-1280} dev $link
- ip addr add $local6 dev $link
-
- uci_set_state network "$cfg" ipaddr $local4
- uci_set_state network "$cfg" ip6addr $local6