Skip to content

Commit 1a5863d

Browse files
committed
odhcp6c: rework sendopts handling
Bring logic of sendopts handling in line with ip6prefix handling Signed-off-by: Hans Dedecker <[email protected]>
1 parent 66222dd commit 1a5863d

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

package/network/ipv6/odhcp6c/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=odhcp6c
11-
PKG_RELEASE:=9
11+
PKG_RELEASE:=10
1212

1313
PKG_SOURCE_PROTO:=git
1414
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git

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

+5-6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ proto_dhcpv6_add_prefix() {
4040
append "$3" "$1"
4141
}
4242

43+
proto_dhcpv6_add_sendopts() {
44+
[ -n "$1" ] && append "$3" "-x$1"
45+
}
46+
4347
proto_dhcpv6_setup() {
4448
local config="$1"
4549
local iface="$2"
@@ -80,12 +84,7 @@ proto_dhcpv6_setup() {
8084
append opts "-r$opt"
8185
done
8286

83-
sendopts_cb() {
84-
local val="$1"
85-
[ -n "$val" ] && append opts "-x$val"
86-
}
87-
88-
json_for_each_item sendopts_cb sendopts
87+
json_for_each_item proto_dhcpv6_add_sendopts sendopts opts
8988

9089
append opts "-t${soltimeout:-120}"
9190

0 commit comments

Comments
 (0)