From c32da33c5374929fc5f1589f52022b914f729ec7 Mon Sep 17 00:00:00 2001 From: Ycarus Date: Fri, 27 Jul 2018 17:12:39 +0200 Subject: [PATCH] Add wait param to iptables for omr-bypass --- luci-app-omr-bypass/root/etc/init.d/omr-bypass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/luci-app-omr-bypass/root/etc/init.d/omr-bypass b/luci-app-omr-bypass/root/etc/init.d/omr-bypass index 6b61568cf..f33b2cdba 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -36,8 +36,8 @@ start_service() { ip rule add prio 1 fwmark 0x539 lookup 991337 > /dev/null 2>&1 - if [ "$(iptables -t mangle -L | grep 'match-set ss_rules_dst_bypass dst MARK set')" = "" ]; then - iptables-restore --noflush <<-EOF + if [ "$(iptables -w 40 -t mangle -L | grep 'match-set ss_rules_dst_bypass dst MARK set')" = "" ]; then + iptables-restore --wait=60 --noflush <<-EOF *mangle -A PREROUTING -m set --match-set ss_rules_dst_bypass dst -j MARK --set-mark 0x539 COMMIT @@ -49,7 +49,7 @@ start_service() { config_list_foreach dpi "proto" _bypass_proto ndpi_rules=$(echo $ndpi_rules | awk 'NF') if [ "$ndpi_rules" != "" ]; then - iptables-restore --noflush <<-EOF + iptables-restore --wait=60 --noflush <<-EOF *mangle :omr-bypass-dpi - -A PREROUTING -m addrtype ! --dst-type LOCAL -j omr-bypass-dpi