odhcp6c: rework sendopts handling
Bring logic of sendopts handling in line with ip6prefix handling Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
This commit is contained in:
parent
66222dd92b
commit
1a5863d6d7
|
@ -8,7 +8,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=odhcp6c
|
PKG_NAME:=odhcp6c
|
||||||
PKG_RELEASE:=9
|
PKG_RELEASE:=10
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
|
||||||
|
|
|
@ -40,6 +40,10 @@ proto_dhcpv6_add_prefix() {
|
||||||
append "$3" "$1"
|
append "$3" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proto_dhcpv6_add_sendopts() {
|
||||||
|
[ -n "$1" ] && append "$3" "-x$1"
|
||||||
|
}
|
||||||
|
|
||||||
proto_dhcpv6_setup() {
|
proto_dhcpv6_setup() {
|
||||||
local config="$1"
|
local config="$1"
|
||||||
local iface="$2"
|
local iface="$2"
|
||||||
|
@ -80,12 +84,7 @@ proto_dhcpv6_setup() {
|
||||||
append opts "-r$opt"
|
append opts "-r$opt"
|
||||||
done
|
done
|
||||||
|
|
||||||
sendopts_cb() {
|
json_for_each_item proto_dhcpv6_add_sendopts sendopts opts
|
||||||
local val="$1"
|
|
||||||
[ -n "$val" ] && append opts "-x$val"
|
|
||||||
}
|
|
||||||
|
|
||||||
json_for_each_item sendopts_cb sendopts
|
|
||||||
|
|
||||||
append opts "-t${soltimeout:-120}"
|
append opts "-t${soltimeout:-120}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue