net/iproute2: Pass required explicit -6 for IPv6 tunnels (#347657)
Tunnel modes ipip6 and ip6ip6 require an explicit family selection for the ip tunnel call. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Gentoo-Bug: 347657
This commit is contained in:
parent
683a21b0a0
commit
20480048ca
@ -239,9 +239,14 @@ iproute2_pre_start()
|
|||||||
if [ -n "${tunnel}" ]; then
|
if [ -n "${tunnel}" ]; then
|
||||||
# Set our base metric to 1000
|
# Set our base metric to 1000
|
||||||
metric=1000
|
metric=1000
|
||||||
|
# Bug#347657: If the mode is 'ipip6' or 'ip6ip6', the -6 must be passed
|
||||||
|
# to iproute2 during tunnel creation.
|
||||||
|
local ipproto=''
|
||||||
|
[ "${tunnel##mode ipip6}" != "${tunnel}" ] && ipproto='-6'
|
||||||
|
[ "${tunnel##mode ip6ip6}" != "${tunnel}" ] && ipproto='-6'
|
||||||
|
|
||||||
ebegin "Creating tunnel ${IFVAR}"
|
ebegin "Creating tunnel ${IFVAR}"
|
||||||
ip tunnel add ${tunnel} name "${IFACE}"
|
ip ${ipproto} tunnel add ${tunnel} name "${IFACE}"
|
||||||
eend $? || return 1
|
eend $? || return 1
|
||||||
_up
|
_up
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user