diff options
author | shin <shin@FreeBSD.org> | 2000-03-28 17:39:53 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-03-28 17:39:53 +0000 |
commit | ef2ad588bc64686d6b4461aa77574845aee684d1 (patch) | |
tree | f3b6578052364d45aab78fbe7890b52ada30f428 | |
parent | b9cb6f83fc005d50087afb3add38a73a1813cdf0 (diff) | |
download | FreeBSD-src-ef2ad588bc64686d6b4461aa77574845aee684d1.zip FreeBSD-src-ef2ad588bc64686d6b4461aa77574845aee684d1.tar.gz |
Add a configuration options which enable/disable IPv4 mapped IPv6 addr
support.
Suggested and Reviewed by: ume
-rw-r--r-- | etc/defaults/rc.conf | 2 | ||||
-rw-r--r-- | etc/rc.d/network_ipv6 | 11 | ||||
-rw-r--r-- | etc/rc.network6 | 11 |
3 files changed, 24 insertions, 0 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index d84bd1e..3638add 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -232,6 +232,8 @@ stf_interface_ipv4plen="0" # Prefix length for 6to4 IPv4 addr, stf_interface_ipv6_ifid="0:0:0:1" # IPv6 interface id for stf0. # If you like, you can set "AUTO" for this. stf_interface_ipv6_slaid="0000" # IPv6 Site Level Aggregator for stf0 +ipv6_ipv4mapping="YES"; # Set to brank to disable IPv4 mapped IPv6 addr + # communication. (like ::ffff:a.b.c.d) ############################################################## ### System console options ################################# diff --git a/etc/rc.d/network_ipv6 b/etc/rc.d/network_ipv6 index 801077f..d4c5dd2 100644 --- a/etc/rc.d/network_ipv6 +++ b/etc/rc.d/network_ipv6 @@ -212,6 +212,17 @@ network6_pass1() { ;; esac + case ${ipv6_ipv4mapping} in + [Yy][Ee][Ss]) + echo -n ' IPv4 mapped IPv6 address support=YES' + sysctl -w net.inet6.ip6.mapped_addr=1 >/dev/null + ;; + '' | *) + echo -n ' IPv4 mapped IPv6 address support=NO' + sysctl -w net.inet6.ip6.mapped_addr=0 >/dev/null + ;; + esac + echo '.' # Let future generations know we made it. diff --git a/etc/rc.network6 b/etc/rc.network6 index 801077f..d4c5dd2 100644 --- a/etc/rc.network6 +++ b/etc/rc.network6 @@ -212,6 +212,17 @@ network6_pass1() { ;; esac + case ${ipv6_ipv4mapping} in + [Yy][Ee][Ss]) + echo -n ' IPv4 mapped IPv6 address support=YES' + sysctl -w net.inet6.ip6.mapped_addr=1 >/dev/null + ;; + '' | *) + echo -n ' IPv4 mapped IPv6 address support=NO' + sysctl -w net.inet6.ip6.mapped_addr=0 >/dev/null + ;; + esac + echo '.' # Let future generations know we made it. |