odhcp6c: add option "sourcefilter" to disable source filter
authorSteven Barth <cyrus@openwrt.org>
Sat, 18 Jul 2015 05:44:50 +0000 (05:44 +0000)
committerSteven Barth <cyrus@openwrt.org>
Sat, 18 Jul 2015 05:44:50 +0000 (05:44 +0000)
Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 46408

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

index 5bf43bd94de81927803c2de82d9c738c4dde5582..75de54c493d737bf13a6e6dbb278563a91b369b9 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=odhcp6c
-PKG_VERSION:=2015-07-13
+PKG_VERSION:=2015-07-18
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index b8cbddb9422f3da0655de0093ff8f08e18e617bb..33f6d9b4cb9f391b2d16fd2cc83291e8d6e18662 100755 (executable)
@@ -76,7 +76,7 @@ setup_interface () {
        done
 
        for entry in $RA_ROUTES; do
-               local duplicate=0
+               local duplicate=$NOSOURCEFILTER
                local addr="${entry%%/*}"
                entry="${entry#*/}"
                local mask="${entry%%,*}"
index adcb1007a9684af6fff821be7490640ba09ffa10..4a453fdc4d94d9298067a986b0e4c6054b6c0a60 100755 (executable)
@@ -28,14 +28,15 @@ proto_dhcpv6_init_config() {
        proto_config_add_boolean delegate
        proto_config_add_int "soltimeout"
        proto_config_add_boolean fakeroutes
+       proto_config_add_boolean sourcefilter
 }
 
 proto_dhcpv6_setup() {
        local config="$1"
        local iface="$2"
 
-       local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
-       json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes
+       local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
+       json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
 
 
        # Configure
@@ -76,6 +77,7 @@ proto_dhcpv6_setup() {
        [ -n "$zone_464xlat" ] && proto_export "ZONE_464XLAT=$zone_464xlat"
        [ -n "$zone" ] && proto_export "ZONE=$zone"
        [ "$fakeroutes" != "0" ] && proto_export "FAKE_ROUTES=1"
+       [ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1"
 
        proto_export "INTERFACE=$config"
        proto_run_command "$config" odhcp6c \