1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

More check for omr-bypass

This commit is contained in:
Ycarus 2019-01-27 10:15:33 +01:00
parent 49a33825f3
commit 5023788519

View file

@ -155,7 +155,7 @@ _bypass_proto() {
domains="$(cat /proc/net/xt_ndpi/host_proto | grep $proto: | sed -e "s/$proto://" -e 's/*//' -e 's/,/ /g')"
if [ -n "$domains" ]; then
for domain in $domains; do
if [ "$(uci -q show omr-bypass | grep $domain)" = "" ]; then
if [ -n "$domain" ] && [ "$(uci -q show omr-bypass | grep $domain)" = "" ]; then
_bypass_domain $domain $intf
fi
done
@ -165,12 +165,14 @@ _bypass_proto() {
_intf_rule() {
local intf
config_get intf $1 ifname
[ -z "$ifname" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]')
[ -z "$intf" ] && intf=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]')
#count=$((count+1))
config_get count $1 metric
local mode
config_get mode $1 multipath "off"
[ "$mode" = "off" ] && return
[ -z "$count" ] && return
[ -z "$intf" ] && return
[ "$(echo $1 | grep _dev)" != "" ] && return
ipset -q flush omr_rules_dst_bypass_$intf > /dev/null 2>&1
ipset -q flush omr_rules6_dst_bypass_$intf > /dev/null 2>&1