odhcp6c: work around RIOs matching PIOs as sent by some apple routers
authorSteven Barth <cyrus@openwrt.org>
Wed, 10 Jun 2015 15:54:24 +0000 (15:54 +0000)
committerSteven Barth <cyrus@openwrt.org>
Wed, 10 Jun 2015 15:54:24 +0000 (15:54 +0000)
Thanks to Mikael Abrahamsson for reporting.

Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 45941

package/network/ipv6/odhcp6c/Makefile
package/network/ipv6/odhcp6c/files/dhcpv6.script

index a90f5ce1628dbb05f671dfeb7cc5631d34c22f0b..d0935eb8b6d62a95279a22435d1c556a3a915f7c 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=odhcp6c
-PKG_VERSION:=2015-06-09
+PKG_VERSION:=2015-06-10
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index 650c9b2e8f57462f34cd62a56fe5cb5d563108b5..84eb706ebcec603483b549cb8cefe335b219513a 100755 (executable)
@@ -88,6 +88,10 @@ setup_interface () {
 
                if [ -z "$gw" ]; then
                        proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
+
+                       # work around if there is a PIO matching a RIO
+                       # Linux seems to prefer source-dest over dest-only even if metric is higher
+                       proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "$addr/$mask"
                else
                        for prefix in $PREFIXES $ADDRESSES; do
                                local paddr="${prefix%%,*}"