shadowsocks-libev: flush ss rules on entry
authorYousong Zhou <yszhou4tech@gmail.com>
Mon, 11 Feb 2019 13:21:04 +0000 (13:21 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Mon, 11 Feb 2019 13:34:56 +0000 (13:34 +0000)
Fixes issue reported in openwrt/luci#2527

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
net/shadowsocks-libev/Makefile
net/shadowsocks-libev/files/shadowsocks-libev.init

index 98b579305efa51869bca6ad17b2be1e0d99aa9db..2c935fd81953d9df3a7f93c9f7052d7b74ca5917 100644 (file)
@@ -14,7 +14,7 @@ include $(TOPDIR)/rules.mk
 #
 PKG_NAME:=shadowsocks-libev
 PKG_VERSION:=3.2.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
index 23cb873cc681c4836241122903e2af8d89095810..12b6a915ee4e532f6f51d8b6c427abd41f531ea6 100644 (file)
@@ -144,12 +144,15 @@ ss_rules() {
        local args
 
        [ -x "$bin" ] || return 1
+       "$bin" -f
+       "$bin" -f -6
+
        config_get cfgtype "$cfg" TYPE
        [ "$cfgtype" = ss_rules ] || return 1
 
        eval "$(validate_ss_rules_section "$cfg" ss_validate_mklocal)"
        validate_ss_rules_section "$cfg" || return 1
-       [ "$disabled" = 0 ] || return 1
+       [ "$disabled" = 0 ] || return 0
 
        eval local_port_tcp="\$ss_rules_redir_tcp_$redir_tcp"
        eval local_port_udp="\$ss_rules_redir_udp_$redir_udp"