shadowsocks-libev: validate bool with default value 0
authorYousong Zhou <redacted>
Sun, 23 Jul 2017 15:15:23 +0000 (23:15 +0800)
committerYousong Zhou <redacted>
Sun, 23 Jul 2017 15:29:47 +0000 (23:29 +0800)
The change is mainly for keeping compatibility with old validate_data
before ubox commit ac481cdd999ee84d3f115c33a56397237e95ec64 in Sat Jul
16 14:52:36 2016 +0200.  The behaviour change comes with that commit can
be seen with the following command line session

    root@LEDE:/usr/bin# validate_data network interface wan 'disabled:bool:false'
    network.wan.disabled is unset and defaults to bool false
    disabled=0; root@LEDE:/usr/bin#

    root@OpenWrt:/# validate_data network interface lan 'disabled:bool:false'
    disabled='false'; root@OpenWrt:/#

This will cause shadowsocks-libev in current master branch fail on OpenWrt
15.01 though they actually should only use packages from the 15.01 branch...

Fixes openwrt/packages#4614

Signed-off-by: Yousong Zhou <redacted>
net/shadowsocks-libev/Makefile
net/shadowsocks-libev/files/shadowsocks-libev.init

index 1b8540a50ffa453ec6091d41abd141d186a3a857..b36d9a3a8889a836ad239091e6d7343da047c2f9 100644 (file)
@@ -19,7 +19,7 @@ include $(TOPDIR)/rules.mk
 #
 PKG_NAME:=shadowsocks-libev
 PKG_VERSION:=3.0.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
index 68ec93b035d5f5c1a616290a58d670367a42fb53..f59b749555ba2379b69240114005f07e6432e413 100644 (file)
@@ -241,7 +241,7 @@ validate_common_server_options_() {
        local aead_methods='"aes-128-gcm", "aes-192-gcm", "aes-256-gcm"'
 
        "${func:-ss_validate}" "$cfgtype" "$cfg" "$@" \
-               'disabled:bool:false' \
+               'disabled:bool:0' \
                'server:host' \
                'server_port:port' \
                'password:string' \
@@ -262,10 +262,10 @@ validate_common_options_() {
        local func="$1"; shift
 
        "${func:-ss_validate}" "$cfgtype" "$cfg" "$@" \
-               'disabled:bool:false' \
-               'verbose:bool:false' \
-               'fast_open:bool:false' \
-               'reuse_port:bool:false' \
+               'disabled:bool:0' \
+               'verbose:bool:0' \
+               'fast_open:bool:0' \
+               'reuse_port:bool:0' \
                'mode:or("tcp_only", "udp_only", "tcp_and_udp")' \
                'mtu:uinteger' \
                'timeout:uinteger' \
@@ -286,7 +286,7 @@ validate_ss_redir_section() {
 
 validate_ss_rules_section() {
        "${2:-ss_validate}" ss_rules "$1" \
-               'disabled:bool:false' \
+               'disabled:bool:0' \
                'redir_tcp:uci("shadowsocks-libev", "@ss_redir")' \
                'redir_udp:uci("shadowsocks-libev", "@ss_redir")' \
                'src_ips_bypass:list(ipaddr)' \
git clone https://git.99rst.org/PROJECT