From 65edbf1af28fe8885451b2d44f36c6383b783756 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Wed, 24 Jul 2019 08:19:44 +0200 Subject: [PATCH] Fix on omr-bypass when reload is used but interfaces set not defined --- luci-app-omr-bypass/root/etc/init.d/omr-bypass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ff6109c6b..e002387d9 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -186,7 +186,8 @@ _intf_rule() { [ -z "$count" ] && return [ -z "$intf" ] && return [ "$(echo $1 | grep _dev)" != "" ] && return - [ -z "$RELOAD" ] && { + [ -z "$RELOAD" ] || [ "$(ipset --list | grep omr_dst_bypass_$intf)" = "" ] && { + unset RELOAD ipset -q flush omr_dst_bypass_$intf > /dev/null 2>&1 ipset -q flush omr6_dst_bypass_$intf > /dev/null 2>&1 ipset -q --exist restore <<-EOF