@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=wireguard-tools
PKG_VERSION:=1.0.20191226
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/
@@ -68,7 +68,7 @@ proto_wireguard_setup_peer() {
[ "${persistent_keepalive}" ] && echo "PersistentKeepalive=${persistent_keepalive}"
} >> "${wg_cfg}"
- if [ ${route_allowed_ips} -ne 0 ]; then
+ if [ "${route_allowed_ips}" -ne 0 ]; then
for allowed_ip in ${allowed_ips}; do
case "${allowed_ip}" in
*:*/*)
@@ -95,7 +95,11 @@ proto_wireguard_setup() {
local private_key
local listen_port
+ local addresses
local mtu
+ local fwmark
+ local ip6prefix
+ local nohostroute
config_load network
config_get private_key "${config}" "private_key"
@@ -126,7 +130,7 @@ proto_wireguard_setup() {
config_foreach proto_wireguard_setup_peer "wireguard_${config}"
# apply configuration file
- ${WG} setconf ${config} "${wg_cfg}"
+ ${WG} setconf "${config}" "${wg_cfg}"
WG_RETURN=$?
rm -f "${wg_cfg}"
@@ -162,7 +166,7 @@ proto_wireguard_setup() {
if [ "${nohostroute}" != "1" ]; then
wg show "${config}" endpoints | \
sed -E 's/\[?([0-9.:a-f]+)\]?:([0-9]+)/\1 \2/' | \
- while IFS=$'\t ' read -r key address port; do
+ while IFS="$(printf '\t')" read -r address port; do
[ -n "${port}" ] || continue
proto_add_host_dependency "${config}" "${address}"
done
Missing local variables and quoting fixes. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- v2: Added PKG_RELEASE bump. package/network/utils/wireguard-tools/Makefile | 2 +- .../network/utils/wireguard-tools/files/wireguard.sh | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-)