From 33832218347d4ad533fdd599499560b6cdd70131 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 3 May 2007 12:19:18 +0000 Subject: Only use any when >1 interface --- net.Linux/ip6to4.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'net.Linux/ip6to4.sh') diff --git a/net.Linux/ip6to4.sh b/net.Linux/ip6to4.sh index f5d8b15..54cbe8a 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 -- cgit v1.2.3