From: Hans Dedecker Date: Wed, 31 Jan 2018 11:58:53 +0000 (+0100) Subject: odhcp6c: add defaultreqopts config option X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=cc7a005c1a8b050447a6c67c18a1681f25800b34;p=openwrt%2Fstaging%2Fsvanheule.git odhcp6c: add defaultreqopts config option By default odhcp6c asks for a default list of options; the config option defaultreqopts allows to tweak this behavior. When set to 0 odhcp6c will not ask for any options except for the options specified in the reqopts config option. Signed-off-by: Hans Dedecker --- diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 891e8d9013..674d12fc6e 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index fa3c44c2c4..82b329de9b 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -11,6 +11,7 @@ proto_dhcpv6_init_config() { proto_config_add_string 'reqprefix:or("auto","no",range(0, 64))' proto_config_add_string clientid proto_config_add_string 'reqopts:list(uinteger)' + proto_config_add_string 'defaultreqopts:bool' proto_config_add_string 'noslaaconly:bool' proto_config_add_string 'forceprefix:bool' proto_config_add_string 'extendprefix:bool' @@ -39,8 +40,8 @@ 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 sendopts delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff - json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff + local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff + json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff # Configure @@ -52,6 +53,8 @@ proto_dhcpv6_setup() { [ -n "$clientid" ] && append opts "-c$clientid" + [ "$defaultreqopts" = "0" ] && append opts "-R" + [ "$noslaaconly" = "1" ] && append opts "-S" [ "$forceprefix" = "1" ] && append opts "-F"