Browse Source

shadowsocks-libev: fix validation of list option

ubox 'list' type is for validating multiple elements separated by
tabs/whitespaces in a single value.  E.g. The following should not be
accepted

    list src_ip_bypass '1.2.3.4 4.3.2.1'

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
lilik-openwrt-22.03
Yousong Zhou 7 years ago
parent
commit
cff4f65d81
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

@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
# #
PKG_NAME:=shadowsocks-libev PKG_NAME:=shadowsocks-libev
PKG_VERSION:=3.0.8 PKG_VERSION:=3.0.8
PKG_RELEASE:=8
PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION) 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

@ -287,18 +287,18 @@ validate_ss_rules_section() {
'disabled:bool:0' \ 'disabled:bool:0' \
'redir_tcp:uci("shadowsocks-libev", "@ss_redir")' \ 'redir_tcp:uci("shadowsocks-libev", "@ss_redir")' \
'redir_udp:uci("shadowsocks-libev", "@ss_redir")' \ 'redir_udp:uci("shadowsocks-libev", "@ss_redir")' \
'src_ips_bypass:list(or(ip4addr,cidr4))' \
'src_ips_forward:list(or(ip4addr,cidr4))' \
'src_ips_checkdst:list(or(ip4addr,cidr4))' \
'src_ips_bypass:or(ip4addr,cidr4)' \
'src_ips_forward:or(ip4addr,cidr4)' \
'src_ips_checkdst:or(ip4addr,cidr4)' \
'dst_ips_bypass_file:file' \ 'dst_ips_bypass_file:file' \
'dst_ips_bypass:list(or(ip4addr,cidr4))' \
'dst_ips_bypass:or(ip4addr,cidr4)' \
'dst_ips_forward_file:file' \ 'dst_ips_forward_file:file' \
'dst_ips_forward:list(or(ip4addr,cidr4))' \
'dst_ips_forward:or(ip4addr,cidr4)' \
'src_default:or("bypass", "forward", "checkdst"):checkdst' \ 'src_default:or("bypass", "forward", "checkdst"):checkdst' \
'dst_default:or("bypass", "forward"):bypass' \ 'dst_default:or("bypass", "forward"):bypass' \
'local_default:or("bypass", "forward", "checkdst"):bypass' \ 'local_default:or("bypass", "forward", "checkdst"):bypass' \
'dst_forward_recentrst:bool:0' \ 'dst_forward_recentrst:bool:0' \
'ifnames:list(maxlength(15))' \
'ifnames:maxlength(15)' \
'ipt_args:string' 'ipt_args:string'
} }


Loading…
Cancel
Save