diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2013-04-13 14:31:21 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2013-04-13 14:31:21 +0200 |
commit | 748fed60e3c4950b431d5d3c4fae70cb1cc59d4c (patch) | |
tree | cb0c58432daaf29e8cfac2493bf1a852c5293ffa /src/lib/ip | |
parent | 6116dfaf2e2c0fe51d1cd0998e697acb5136b481 (diff) | |
download | netctl-748fed60e3c4950b431d5d3c4fae70cb1cc59d4c.tar.gz netctl-748fed60e3c4950b431d5d3c4fae70cb1cc59d4c.tar.xz |
Allow IP6 address to be set in case IP6=stateless
Router advertisements can tell clients to not generate a public address automatically (AdvAutonomous off).
Reported by: Jonne Haß
Diffstat (limited to 'src/lib/ip')
-rw-r--r-- | src/lib/ip | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 |