diff options
author | ume <ume@FreeBSD.org> | 2009-09-30 14:58:10 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2009-09-30 14:58:10 +0000 |
commit | da9ae504397cf8ef970c4e4633e391a1f153054b (patch) | |
tree | acdd3a682b7270d72293ebf6fe3ae82f754e9492 /etc/rc.d/netoptions | |
parent | e020b62ba48e93b7c2bf987e6918a4e0fd0d0d9b (diff) | |
download | FreeBSD-src-da9ae504397cf8ef970c4e4633e391a1f153054b.zip FreeBSD-src-da9ae504397cf8ef970c4e4633e391a1f153054b.tar.gz |
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>
Diffstat (limited to 'etc/rc.d/netoptions')
-rwxr-xr-x | etc/rc.d/netoptions | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/rc.d/netoptions b/etc/rc.d/netoptions index 593333a..2d21525 100755 --- a/etc/rc.d/netoptions +++ b/etc/rc.d/netoptions @@ -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 '.' |