summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2014-07-05 15:56:12 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2014-07-05 17:56:38 +0200
commit3fce1e6f67cd52afa4470c1ee7d42112d9d9405b (patch)
treeb1ea899b40cbd5c5b603030cc2d31283f96110a3
parent0f51aa966b1afb835425f8a4c91ec38f4f36babc (diff)
downloadnetctl-3fce1e6f67cd52afa4470c1ee7d42112d9d9405b.tar.gz
netctl-3fce1e6f67cd52afa4470c1ee7d42112d9d9405b.tar.xz
Disable IPv6 on IP6=no
-rw-r--r--src/lib/ip3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ip b/src/lib/ip
index 66aab56..b7847a2 100644
--- a/src/lib/ip
+++ b/src/lib/ip
@@ -47,11 +47,12 @@ ip_set() {
case "$IP6" in
dhcp*|stateless|static)
[[ -d "/proc/sys/net/ipv6" ]] || modprobe ipv6
+ sysctl -q -w "net.ipv6.conf.$interface_sysctl.disable_ipv6=0"
[[ $IP6 == "static" ]]
sysctl -q -w "net.ipv6.conf.$interface_sysctl.accept_ra=$?"
;;
no)
- [[ -d "/proc/sys/net/ipv6" ]] && sysctl -q -w "net.ipv6.conf.$interface_sysctl.accept_ra=0"
+ [[ -d "/proc/sys/net/ipv6" ]] && sysctl -q -w "net.ipv6.conf.$interface_sysctl.disable_ipv6=1"
;;
"") # undefined IP6 does not prevent RA's from being received -> nop
;;