mwan3: Fix json_load fails with some data
authoryurtesen <eyurtese@abo.fi>
Tue, 12 Nov 2019 15:53:51 +0000 (17:53 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 28 Apr 2020 08:21:14 +0000 (10:21 +0200)
Sometimes the return value of `ubus -S call network.interface.wan status`
cause `json_load` to return `Failed to parse message data` error.

To avoid this, the JSON data always should be quoted with double quotes.

Signed-off-by: Evren Yurtesen <eyurtese@abo.fi>
Removed quoatation marks from commit heading
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 94e0c78826b15c95c40bfa82bbf8bba35dc56961)

net/mwan3/Makefile
net/mwan3/files/usr/sbin/mwan3

index adb54b24ae08cc29ca7b73a52022eac00d057bcc..62efd088bff42b337130c052ab950db20a0b8e82 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwan3
-PKG_VERSION:=2.6.18
+PKG_VERSION:=2.6.18-1
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
 PKG_LICENSE:=GPLv2
index a0c296f18e2bc0ea2acce0787163a596723a044f..3fcf4cacb1b6f7105755040c86fa77054245f265 100755 (executable)
@@ -61,7 +61,7 @@ ifup()
                exit 0
        }
 
-       json_load $(ubus -S call network.interface.$1 status)
+       json_load "$(ubus -S call network.interface.$1 status)"
        json_get_vars up l3_device
        config_get enabled "$1" enabled 0