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 <dedeckeh@gmail.com>
This commit is contained in:
		| @@ -8,7 +8,7 @@ | |||||||
| include $(TOPDIR)/rules.mk | include $(TOPDIR)/rules.mk | ||||||
|  |  | ||||||
| PKG_NAME:=odhcp6c | PKG_NAME:=odhcp6c | ||||||
| PKG_RELEASE:=5 | PKG_RELEASE:=6 | ||||||
|  |  | ||||||
| PKG_SOURCE_PROTO:=git | PKG_SOURCE_PROTO:=git | ||||||
| PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git | PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git | ||||||
|   | |||||||
| @@ -11,6 +11,7 @@ proto_dhcpv6_init_config() { | |||||||
| 	proto_config_add_string 'reqprefix:or("auto","no",range(0, 64))' | 	proto_config_add_string 'reqprefix:or("auto","no",range(0, 64))' | ||||||
| 	proto_config_add_string clientid | 	proto_config_add_string clientid | ||||||
| 	proto_config_add_string 'reqopts:list(uinteger)' | 	proto_config_add_string 'reqopts:list(uinteger)' | ||||||
|  | 	proto_config_add_string 'defaultreqopts:bool' | ||||||
| 	proto_config_add_string 'noslaaconly:bool' | 	proto_config_add_string 'noslaaconly:bool' | ||||||
| 	proto_config_add_string 'forceprefix:bool' | 	proto_config_add_string 'forceprefix:bool' | ||||||
| 	proto_config_add_string 'extendprefix:bool' | 	proto_config_add_string 'extendprefix:bool' | ||||||
| @@ -39,8 +40,8 @@ proto_dhcpv6_setup() { | |||||||
| 	local config="$1" | 	local config="$1" | ||||||
| 	local iface="$2" | 	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 | 	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 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 | 	# Configure | ||||||
| @@ -52,6 +53,8 @@ proto_dhcpv6_setup() { | |||||||
|  |  | ||||||
| 	[ -n "$clientid" ] && append opts "-c$clientid" | 	[ -n "$clientid" ] && append opts "-c$clientid" | ||||||
|  |  | ||||||
|  | 	[ "$defaultreqopts" = "0" ] && append opts "-R" | ||||||
|  |  | ||||||
| 	[ "$noslaaconly" = "1" ] && append opts "-S" | 	[ "$noslaaconly" = "1" ] && append opts "-S" | ||||||
|  |  | ||||||
| 	[ "$forceprefix" = "1" ] && append opts "-F" | 	[ "$forceprefix" = "1" ] && append opts "-F" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Hans Dedecker
					Hans Dedecker