From 748fed60e3c4950b431d5d3c4fae70cb1cc59d4c Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Sat, 13 Apr 2013 14:31:21 +0200 Subject: Allow IP6 address to be set in case IP6=stateless MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Router advertisements can tell clients to not generate a public address automatically (AdvAutonomous off). Reported by: Jonne Haß --- src/lib/ip | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/ip b/src/lib/ip index c1f1fc7..8af7069 100644 --- a/src/lib/ip +++ b/src/lib/ip @@ -116,9 +116,11 @@ ip_set() { ;; stateless) sysctl -q -w "net.ipv6.conf.$interface_sysctl.accept_ra=1" - ;; + ;;& static) sysctl -q -w "net.ipv6.conf.$interface_sysctl.accept_ra=0" + ;;& + stateless|static) if [[ -n $Address6 ]]; then for addr in "${Address6[@]}"; do if ! do_debug ip -6 addr add $addr dev "$Interface"; then @@ -147,7 +149,7 @@ ip_set() { fi # Set a custom gateway after DAD has finished - if [[ $IP6 == "static" && $Gateway6 ]]; then + if [[ $IP6 == @(stateless|static) && $Gateway6 ]]; then if ! do_debug ip -6 route replace default via "$Gateway6" dev "$Interface"; then report_error "Could not set gateway '$Gateway6' on interface '$Interface'" return 1 -- cgit v1.2.3-24-g4f1b