[openwrt/openwrt] odhcp6c: fix appending of emtpy sendopt value (FS#1336)

LEDE Commits lede-commits at lists.infradead.org
Thu Feb 8 09:29:56 PST 2018


dedeckeh pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/787326b43e332b378899205294b1d92ea77a45d4

commit 787326b43e332b378899205294b1d92ea77a45d4
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Thu Feb 8 18:21:12 2018 +0100

    odhcp6c: fix appending of emtpy sendopt value (FS#1336)
    
    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 at gmail.com>
---
 package/network/ipv6/odhcp6c/Makefile        | 2 +-
 package/network/ipv6/odhcp6c/files/dhcpv6.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
index ac793f1..9989f80 100644
--- a/package/network/ipv6/odhcp6c/Makefile
+++ b/package/network/ipv6/odhcp6c/Makefile
@@ -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
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
index bc7f01d..5c2ee6b 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
@@ -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



More information about the lede-commits mailing list