aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2019-04-05 22:45:08 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2019-04-05 22:45:08 +0000
commit734b726d8090e36e19fc578e600edefc93c52ebb (patch)
tree7d7b27b939e9f56a6d838dfab1f09721899f5582 /libexec/rc
parentca34d6aeda93827f779ee0a8f066ed9f544f0a62 (diff)
Notes
Diffstat (limited to 'libexec/rc')
-rw-r--r--libexec/rc/network.subr18
1 files changed, 15 insertions, 3 deletions
diff --git a/libexec/rc/network.subr b/libexec/rc/network.subr
index cc8756b57f35e..a92eb9ce21498 100644
--- a/libexec/rc/network.subr
+++ b/libexec/rc/network.subr
@@ -1328,7 +1328,7 @@ wlan_down()
#
clone_up()
{
- local _list ifn ifopt _iflist _n tmpargs
+ local _list ifn ifopt _iflist _inet6 _n tmpargs
_list=
_iflist=$*
@@ -1394,9 +1394,21 @@ clone_up()
esac
if [ $? -eq 0 ]; then
_list="$_list $ifn"
+ tmpargs=$(get_if_var $ifn gifconfig_IF)
+ _inet6=''
+ case "$tmpargs" in
+ '')
+ ;;
+ inet6[[:space:]]*)
+ tmpargs=${tmpargs#inet6}
+ _inet6=inet6
+ # FALLTHROUGH
+ ;&
+ *)
+ ${IFCONFIG_CMD} $ifn $_inet6 tunnel $tmpargs
+ ;;
+ esac
fi
- tmpargs=$(get_if_var $ifn gifconfig_IF)
- eval ifconfig_${ifn}=\"\$ifconfig_${ifn} tunnel \$tmpargs\"
done
if [ -n "${_list# }" ]; then
echo "Created clone interfaces: ${_list# }."