mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 11:44:48 +00:00
shadowsocks-libev: validate bool with default value 0
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 <yszhou4tech@gmail.com>
This commit is contained in:
@@ -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)' \
|
||||
|
||||
Reference in New Issue
Block a user