summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2011-02-21 09:53:51 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2011-02-21 09:55:47 +0000
commit20480048cae39d6c3c8bb4fdb7bfc5cc842c61ca (patch)
treef103d62d2de855acaad1d9542353fd52a7a28cea
parent683a21b0a0e52ad756366a9527f509761214e971 (diff)
downloadopenrc-20480048cae39d6c3c8bb4fdb7bfc5cc842c61ca.tar.gz
openrc-20480048cae39d6c3c8bb4fdb7bfc5cc842c61ca.tar.bz2
openrc-20480048cae39d6c3c8bb4fdb7bfc5cc842c61ca.tar.xz
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
-rw-r--r--net/iproute2.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 6194faf..a2e9db7 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -239,9 +239,14 @@ iproute2_pre_start()
if [ -n "${tunnel}" ]; then
# Set our base metric to 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}"
- ip tunnel add ${tunnel} name "${IFACE}"
+ ip ${ipproto} tunnel add ${tunnel} name "${IFACE}"
eend $? || return 1
_up
fi