diff options
-rw-r--r-- | docs/netctl.profile.5.txt | 4 | ||||
-rw-r--r-- | src/lib/ip | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/docs/netctl.profile.5.txt b/docs/netctl.profile.5.txt index 15234bb..9841a82 100644 --- a/docs/netctl.profile.5.txt +++ b/docs/netctl.profile.5.txt @@ -114,13 +114,13 @@ network. In particular, these connection types are +ethernet+, An array of custom routes of the form + `**<address range>** via **<gateway>**'. -'Address6=()' [requires 'IP6=static']:: +'Address6=()' [requires 'IP6=static' or 'IP6=stateless']:: An array of IPv6 addresses. Prefix length may be specified via `1234:bcd::11/64' syntax. It is possible to specify modifiers, in particular, `1234:bcd::11/64 nodad' disables Duplicate Address Detection for the address. -'Gateway6=' [requires 'IP6=static']:: +'Gateway6=' [requires 'IP6=static' or 'IP6=stateless']:: An IPv6 routing gateway address. 'Routes6=':: @@ -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 |