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:
parent
77045a786d
commit
c73fa3a692
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue