Only use any when >1 interface
This commit is contained in:
parent
da7f6e7b11
commit
3383221834
@ -17,7 +17,7 @@ ip6to4_start() {
|
|||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
|
|
||||||
local host= suffix= relay= addr= iface=${IFACE} new=
|
local host= suffix= relay= addr= iface=${IFACE} new= localip=
|
||||||
eval host=\$link_${IFVAR}
|
eval host=\$link_${IFVAR}
|
||||||
if [ -z "${host}" ] ; then
|
if [ -z "${host}" ] ; then
|
||||||
eerror "link_${IFVAR} not set"
|
eerror "link_${IFVAR} not set"
|
||||||
@ -71,6 +71,12 @@ ip6to4_start() {
|
|||||||
|
|
||||||
# Now apply our IPv6 address to our config
|
# Now apply our IPv6 address to our config
|
||||||
new="${new}${new:+ }${ip6}/16"
|
new="${new}${new:+ }${ip6}/16"
|
||||||
|
|
||||||
|
if [ -n "${localip}" ] ; then
|
||||||
|
localip="any"
|
||||||
|
else
|
||||||
|
localip="${ip}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "${new}" ] ; then
|
if [ -z "${new}" ] ; then
|
||||||
@ -80,7 +86,7 @@ ip6to4_start() {
|
|||||||
|
|
||||||
if [ "${IFACE}" != "sit0" ] ; then
|
if [ "${IFACE}" != "sit0" ] ; then
|
||||||
ebegin "Creating 6to4 tunnel on ${IFACE}"
|
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
|
eend $? || return 1
|
||||||
_up
|
_up
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user