Don't do an IPv6 operation when the kernel doesn't have
an IPv6 support. Reported by: Alexander Best <alexbestms__at__math.uni-muenster.de> Confirmed by: Paul B. Mahol <onemda__at__gmail.com>, Alexander Best <alexbestms__at__math.uni-muenster.de>
This commit is contained in:
parent
e020b62ba4
commit
da9ae50439
@ -9,6 +9,7 @@
|
||||
# KEYWORD: nojail
|
||||
|
||||
. /etc/rc.subr
|
||||
. /etc/network.subr
|
||||
|
||||
name="netoptions"
|
||||
start_cmd="netoptions_start"
|
||||
@ -66,11 +67,13 @@ netoptions_start()
|
||||
;;
|
||||
esac
|
||||
|
||||
if checkyesno ipv6_ipv4mapping; then
|
||||
${SYSCTL_W} net.inet6.ip6.v6only=0 >/dev/null
|
||||
else
|
||||
echo -n " no-ipv4-mapped-ipv6"
|
||||
${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null
|
||||
if afexists inet6; then
|
||||
if checkyesno ipv6_ipv4mapping; then
|
||||
${SYSCTL_W} net.inet6.ip6.v6only=0 >/dev/null
|
||||
else
|
||||
echo -n " no-ipv4-mapped-ipv6"
|
||||
${SYSCTL_W} net.inet6.ip6.v6only=1 >/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -n "${_netoptions_initdone}" ] && echo '.'
|
||||
|
@ -51,7 +51,9 @@ static_start()
|
||||
;;
|
||||
*)
|
||||
do_static inet add
|
||||
do_static inet6 add
|
||||
if afexists inet6; then
|
||||
do_static inet6 add
|
||||
fi
|
||||
do_static atm add
|
||||
;;
|
||||
esac
|
||||
@ -74,7 +76,9 @@ static_stop()
|
||||
;;
|
||||
*)
|
||||
do_static inet delete
|
||||
do_static inet6 delete
|
||||
if afexists inet6; then
|
||||
do_static inet6 delete
|
||||
fi
|
||||
do_static atm delete
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user