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

Fix loop detection

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-05-22 08:43:36 +02:00
parent 77045a786d
commit c73fa3a692

View file

@ -799,7 +799,7 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om
if [ "$(pgrep openmptcprouter-vps)" = "" ]; then
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
fi
[ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && conntrack -D -p udp
[ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && conntrack -D -p udp 2>&1 >/dev/null
fi
# Set VPN MTU
@ -1138,7 +1138,8 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(
if [ -n "$lanip" ] && [ -n "$masterip" ] && [ -n "$ipaddr" ] && [ "$ipaddr" = "$masterip" ] && [ "$(uci -q get openmptcprouter.settings.disableloopdetection)" != "1" ]; then
loop=0
routingloop() {
if [ "$(omr-routing-loop $1 $lanip)" = "detected" ]; then
vpsip="$(uci -q get openmptcprouter.$1.ip)"
if [ -n "$vpsip" ] && [ "$(omr-routing-loop $vpsip $lanip)" = "detected" ]; then
loop=1
fi
}