summaryrefslogtreecommitdiff
path: root/package/network/ipv6/odhcp6c/files/dhcpv6.script
diff options
context:
space:
mode:
Diffstat (limited to 'package/network/ipv6/odhcp6c/files/dhcpv6.script')
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.script10
1 files changed, 9 insertions, 1 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index 324a823ce9..1d5f521e45 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -64,7 +64,15 @@ setup_interface () {
entry="${entry#*,}"
local metric="${entry%%,*}"
- proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
+ if [ -z "$SOURCE_ROUTING" -o -z "$gw" ]; then
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
+ else
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "::/128"
+ for prefix in $PREFIXES; do
+ local paddr="${prefix%%,*}"
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "$paddr"
+ done
+ fi
done
proto_send_update "$INTERFACE"