diff options
author | Roy Marples <roy@marples.name> | 2007-05-03 12:19:18 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-05-03 12:19:18 +0000 |
commit | 33832218347d4ad533fdd599499560b6cdd70131 (patch) | |
tree | e31a3275aafa7cb20bd26b59e6fe5aafe5aa2812 /net.Linux/ip6to4.sh | |
parent | da7f6e7b11f5198addce3056d1073ef7dfe53cea (diff) |
Only use any when >1 interface
Diffstat (limited to 'net.Linux/ip6to4.sh')
-rw-r--r-- | net.Linux/ip6to4.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net.Linux/ip6to4.sh b/net.Linux/ip6to4.sh index f5d8b158..54cbe8ae 100644 --- a/net.Linux/ip6to4.sh +++ b/net.Linux/ip6to4.sh @@ -17,7 +17,7 @@ ip6to4_start() { fi esac - local host= suffix= relay= addr= iface=${IFACE} new= + local host= suffix= relay= addr= iface=${IFACE} new= localip= eval host=\$link_${IFVAR} if [ -z "${host}" ] ; then eerror "link_${IFVAR} not set" @@ -71,6 +71,12 @@ ip6to4_start() { # Now apply our IPv6 address to our config new="${new}${new:+ }${ip6}/16" + + if [ -n "${localip}" ] ; then + localip="any" + else + localip="${ip}" + fi done if [ -z "${new}" ] ; then @@ -80,7 +86,7 @@ ip6to4_start() { if [ "${IFACE}" != "sit0" ] ; then ebegin "Creating 6to4 tunnel on ${IFACE}" - _tunnel add "${IFACE}" mode sit ttl 255 remote any local any + _tunnel add "${IFACE}" mode sit ttl 255 remote any local "${localip}" eend $? || return 1 _up fi |