1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 19:11:51 +00:00
openmptcprouter-feeds/luci-app-openmptcprouter/root/bin/omr-routing-loop
Ycarus (Yannick Chabanois) b40823e548 Fix loop detection
2021-05-22 17:29:46 +02:00

10 lines
No EOL
159 B
Bash
Executable file

#!/bin/sh
VPS=$1
LANIP=$2
INTF=$3
if [ -n "$(traceroute -q 1 -i ${INTF} -w 1 -n -m 5 ${VPS} | grep ${LANIP})" ]; then
echo "detected"
else
echo "no loop"
fi