odhcp6c: fix appending of emtpy sendopt value (FS#1336)
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 8 Feb 2018 17:21:12 +0000 (18:21 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 8 Feb 2018 17:29:37 +0000 (18:29 +0100)
Don't append an empty sendopts value as odhcp6c bails out
immediately on an empty -x option triggering an infinite start
loop of odhcp6c

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/ipv6/odhcp6c/Makefile
package/network/ipv6/odhcp6c/files/dhcpv6.sh

index ac793f1ad2de589ab57afd9e3d4a45fe1b3ffd61..9989f80f1a64ac2625370e460019be8aaba7d3f8 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=odhcp6c
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
index bc7f01d3220a20686ace80304a26e6f6daad11cf..5c2ee6b988ca085337201a97ad8a80a1c9bb38e8 100755 (executable)
@@ -77,7 +77,7 @@ proto_dhcpv6_setup() {
 
        sendopts_cb() {
                local val="$1"
-               append opts "-x$val"
+               [ -n "$val" ] && append opts "-x$val"
        }
 
        json_for_each_item sendopts_cb sendopts