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.script17
1 files changed, 17 insertions, 0 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index ab0b556..03efaf7 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -81,6 +81,23 @@ setup_interface () {
# RFC 7278
if [ "$mask" -eq 64 -a -z "$PREFIXES" -a -n "$EXTENDPREFIX" ]; then
proto_add_ipv6_prefix "$addr/$mask,$preferred,$valid"
+
+ local raroutes=""
+ for route in $RA_ROUTES; do
+ local prefix="${route%%/*}"
+ local entry="${route#*/}"
+ local pmask="${entry%%,*}"
+ entry="${entry#*,}"
+ local gw="${entry%%,*}"
+
+ [ -z "$gw" -a "$mask" = "$pmask" ] && {
+ case "$addr" in
+ "${prefix%*::}"*) continue;;
+ esac
+ }
+ raroutes="$raroutes $route"
+ done
+ RA_ROUTES="$raroutes"
fi
done