summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/defaults/rc.conf2
-rw-r--r--etc/rc.d/network_ipv611
-rw-r--r--etc/rc.network611
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.
OpenPOWER on IntegriCloud