aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-09-05 14:33:01 +0200
committerHans Dedecker <dedeckeh@gmail.com>2017-09-05 14:46:18 +0200
commit995193ccdb2adb2bfe226965589b5f3db71bdd80 (patch)
tree2656c8c4b0f92a0b14e214d62e5edfccfbe47354 /package
parent6b06c2fb8ec15faed936cae79f3d6cec2705cac1 (diff)
downloadupstream-995193ccdb2adb2bfe226965589b5f3db71bdd80.tar.gz
upstream-995193ccdb2adb2bfe226965589b5f3db71bdd80.tar.bz2
upstream-995193ccdb2adb2bfe226965589b5f3db71bdd80.zip
odhcp6c: add workaround for broken extendprefix scenario
Extendprefix is typically used to extend an IPv6 RA prefix from a mobile wan link to the LAN; such scenario requires correct RA prefix settings like the on link flag not being set. However some mobile manufacter set the RA prefix on link flag which breaks basic IPv6 routing. Work around this issue by filtering out the route being equal to the extended prefix. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package')
-rw-r--r--package/network/ipv6/odhcp6c/Makefile6
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.script17
2 files changed, 20 insertions, 3 deletions
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
index a95a380e0d..457a871efb 100644
--- a/package/network/ipv6/odhcp6c/Makefile
+++ b/package/network/ipv6/odhcp6c/Makefile
@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcp6c
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/odhcp6c.git
-PKG_SOURCE_DATE:=2017-09-02
+PKG_SOURCE_DATE:=2017-09-05
PKG_SOURCE_VERSION:=51733a6d3bfe0fb9e8c53aea22231e5b8a1f64c3
-PKG_MIRROR_HASH:=7ab8d3755c588b493792110d871c682cdd8e944ae21db64177321c464c104fb3
+PKG_MIRROR_HASH:=fdccfb9a6cb00d6dbf1a3160bd36622ee8e188a9d58bcd282c71a9368972e184
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
PKG_LICENSE:=GPL-2.0
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index ab0b556755..03efaf7211 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