From 2f73c4853bafa2b7fc414e25570c712375657e96 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Wed, 6 May 2020 21:31:29 +0800 Subject: shadowsocks-libev: ignore error from flushing route table Linux kernel and iproute2 together now implement strict checking of the existence of route tables. Previously kernel does not support filtering by table id, now it does and will error with nlmsgerr "ipv4: FIB table does not exist". Previously iproute2 dump all routes and filter by table id in userspace, now this has changed with iproute2 commit c7e6371bc4af ("ip route: Add protocol, table id and device to dump request") Error scene root@OpenWrt:/# ip route flush table 100 Error: ipv4: FIB table does not exist. Flush terminated root@OpenWrt:/# echo $? 2 Fixes: https://github.com/openwrt/packages/issues/12095 Ref: https://lists.openwall.net/netdev/2019/05/02/105 Signed-off-by: Yousong Zhou --- net/shadowsocks-libev/files/ss-rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/shadowsocks-libev/files') diff --git a/net/shadowsocks-libev/files/ss-rules b/net/shadowsocks-libev/files/ss-rules index 2016667f0..ed033afcf 100755 --- a/net/shadowsocks-libev/files/ss-rules +++ b/net/shadowsocks-libev/files/ss-rules @@ -154,7 +154,7 @@ ss_rules_flush() { iptables-save --counters | grep -v ss_rules_ | iptables-restore --counters while ip rule del fwmark 1 lookup 100 2>/dev/null; do true; done - ip route flush table 100 + ip route flush table 100 2>/dev/null || true for setname in $(ipset -n list | grep "ss_rules${o_af}_"); do ipset destroy "$setname" 2>/dev/null || true done -- cgit v1.2.3