Browse Source

shadowsocks-libev: validate bool with default value 0

The change is mainly for keeping compatibility with old validate_data
before ubox commit ac481cdd99 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 <yszhou4tech@gmail.com>
lilik-openwrt-22.03
Yousong Zhou 7 years ago
parent
commit
3fe965dd1c
2 changed files with 7 additions and 7 deletions
  1. +1
    -1
      net/shadowsocks-libev/Makefile
  2. +6
    -6
      net/shadowsocks-libev/files/shadowsocks-libev.init

+ 1
- 1
net/shadowsocks-libev/Makefile View 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)


+ 6
- 6
net/shadowsocks-libev/files/shadowsocks-libev.init View 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)' \


Loading…
Cancel
Save