summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-01-09 11:43:23 +0100
committerHans Dedecker <dedeckeh@gmail.com>2017-01-09 13:28:22 +0100
commit8d2171e46915528fe4034054c446b5a47d20e4a1 (patch)
treed807ab9dca2d24a9878745ee47e09af2e883df1b
parentf0353c5e8ceefee65728b6507229aab791cf6732 (diff)
downloadmtk-20170518-8d2171e46915528fe4034054c446b5a47d20e4a1.zip
mtk-20170518-8d2171e46915528fe4034054c446b5a47d20e4a1.tar.gz
mtk-20170518-8d2171e46915528fe4034054c446b5a47d20e4a1.tar.bz2
odhcp6c: add option "keep_ra_dnslifetime"
Add option keep_ra_dnslifetime which will preserve the received lifetime for RDNSS and DNSSL RA records and not overwrite it by the RA router lifetime as specified in RFC6106. This allows to accept RDNNS records from RAs that don't announce a default route by setting router lifetime to 0 in the RAs. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r--package/network/ipv6/odhcp6c/Makefile6
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.sh7
2 files changed, 8 insertions, 5 deletions
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
index 863a2f6..60602f5 100644
--- a/package/network/ipv6/odhcp6c/Makefile
+++ b/package/network/ipv6/odhcp6c/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_URL:=git://git.lede-project.org/project/odhcp6c.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2017-01-02
-PKG_SOURCE_VERSION:=5d6fec3a5c2a1a3015a2f26aaa27e05315e188f3
-PKG_MIRROR_HASH:=2a645e264d93cca7545427818acc3781eeb2564c6c9d27a85085a9851c30bb5d
+PKG_SOURCE_DATE:=2017-01-07
+PKG_SOURCE_VERSION:=d420f49396c627ce1072b83170889baf0720bc8b
+PKG_MIRROR_HASH:=a7c599b5600b6cca9aec221dd32fc7754e0e942b0192bd902f1e789f53345127
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
PKG_LICENSE:=GPL-2.0
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
index 6c47399..9e3f669 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
@@ -30,14 +30,15 @@ proto_dhcpv6_init_config() {
proto_config_add_int "soltimeout"
proto_config_add_boolean fakeroutes
proto_config_add_boolean sourcefilter
+ proto_config_add_boolean keep_ra_dnslifetime
}
proto_dhcpv6_setup() {
local config="$1"
local iface="$2"
- local reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix 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 extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter
+ local reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime
# Configure
@@ -61,6 +62,8 @@ proto_dhcpv6_setup() {
[ -n "$userclass" ] && append opts "-u$userclass"
+ [ "$keep_ra_dnslifetime" = "1" ] && append opts "-L"
+
for opt in $reqopts; do
append opts "-r$opt"
done