diff options
author | Steven Barth <steven@midlink.org> | 2013-01-02 23:05:44 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2013-01-02 23:05:44 +0000 |
commit | e1c79f505872db5b8f2666c74399aca59c6db9e4 (patch) | |
tree | 571eeaa189dc379cb04533f86c1c70ce475bcb3e /package/network/ipv6/ipv6-support/files/dhcpv6.sh | |
parent | 1e7f1c6ab717005043d947db7f1611c263fd1b44 (diff) | |
download | upstream-e1c79f505872db5b8f2666c74399aca59c6db9e4.tar.gz upstream-e1c79f505872db5b8f2666c74399aca59c6db9e4.tar.bz2 upstream-e1c79f505872db5b8f2666c74399aca59c6db9e4.zip |
ipv6-support: Update iteration
* Add support for blocking forwarding while address assignments
* Fix relay restarting function
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34985 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6/ipv6-support/files/dhcpv6.sh')
-rwxr-xr-x | package/network/ipv6/ipv6-support/files/dhcpv6.sh | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/package/network/ipv6/ipv6-support/files/dhcpv6.sh b/package/network/ipv6/ipv6-support/files/dhcpv6.sh index 299cf99f3d..9609f04d5c 100755 --- a/package/network/ipv6/ipv6-support/files/dhcpv6.sh +++ b/package/network/ipv6/ipv6-support/files/dhcpv6.sh @@ -12,6 +12,29 @@ resolve_network network "$device" # Unknown network [ -z "$network" ] && exit 0 +if [ "$state" == "started" ]; then + # Start border + set_forward_border "$network" "$device" enable + + # Configure device + conf_set "$device" accept_ra 2 + conf_set "$device" forwarding 2 + + # Trigger RS + conf_set "$device" disable_ipv6 1 + conf_set "$device" disable_ipv6 0 + + exit 0 +elif [ "$state" == "stopped" ]; then + # Deconfigure device + conf_set "$device" accept_ra 1 + conf_set "$device" forwarding 1 + + # Disable border + set_forward_border "$network" "$device" disable + + exit 0 +fi # Announce prefixes for prefix in $PREFIXES; do @@ -23,7 +46,7 @@ for prefix in $PREFIXES_LOST; do done -# Enable relaying if requested +# Enable relaying if requested and we didn't get a prefix, disable otherwise local fallback="stop" [ -z "$PREFIXES" -a "$state" != "unbound" ] && fallback="start" setup_prefix_fallback "$fallback" "$network" "$device" @@ -32,6 +55,9 @@ setup_prefix_fallback "$fallback" "$network" "$device" # Operations in case of success [ "$state" == "timeout" -o "$state" == "unbound" ] && exit 0 +# Handshake completed, disable forwarding border +set_forward_border "$network" "$device" disable + local peerdns config_get_bool peerdns "$network" peerdns 1 [ "$peerdns" -eq "1" ] && { |