diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2018-02-24 20:59:10 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2018-02-24 21:04:06 +0100 |
commit | 1a5863d6d70032b46dbc0e14ae1abb29ac3e81a8 (patch) | |
tree | eac4471f9016bdd7fe700a9bbe3165d3989e9dd4 /package/network/ipv6/odhcp6c/files | |
parent | 66222dd92b3bdb0f035a4ab0370796cfdcdf8593 (diff) | |
download | upstream-1a5863d6d70032b46dbc0e14ae1abb29ac3e81a8.tar.gz upstream-1a5863d6d70032b46dbc0e14ae1abb29ac3e81a8.tar.bz2 upstream-1a5863d6d70032b46dbc0e14ae1abb29ac3e81a8.zip |
odhcp6c: rework sendopts handling
Bring logic of sendopts handling in line with ip6prefix handling
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network/ipv6/odhcp6c/files')
-rwxr-xr-x | package/network/ipv6/odhcp6c/files/dhcpv6.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index 54e51065f6..919872fe8e 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -40,6 +40,10 @@ proto_dhcpv6_add_prefix() { append "$3" "$1" } +proto_dhcpv6_add_sendopts() { + [ -n "$1" ] && append "$3" "-x$1" +} + proto_dhcpv6_setup() { local config="$1" local iface="$2" @@ -80,12 +84,7 @@ proto_dhcpv6_setup() { append opts "-r$opt" done - sendopts_cb() { - local val="$1" - [ -n "$val" ] && append opts "-x$val" - } - - json_for_each_item sendopts_cb sendopts + json_for_each_item proto_dhcpv6_add_sendopts sendopts opts append opts "-t${soltimeout:-120}" |