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

No data error for OMR6in4

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-02-23 19:45:10 +01:00
parent 7e64ecd41d
commit 22ca7a0131

View file

@ -1056,12 +1056,16 @@ function interfaces_status()
mArray.openmptcprouter["tun_state"] = "DOWN"
end
if mArray.openmptcprouter["ipv6"] == "enabled" or mArray.openmptcprouter["service_addr_ip6"] ~= "" then
local tunnel_ipv6_gw = uci:get("network","omr6in4","gateway")
local tunnel_ping6_test = ut.trim(sys.exec("ping6 -w 1 -c 1 " .. tunnel_ipv6_gw .. "%6in4-omr6in4 | grep '100% packet loss'"))
if tunnel_ping6_test == "" then
mArray.openmptcprouter["tun6_state"] = "UP"
local tunnel_ipv6_gw = uci:get("network","omr6in4","gateway") or ""
if tunnel_ipv6_gw ~= "" then
local tunnel_ping6_test = ut.trim(sys.exec("ping6 -w 1 -c 1 " .. tunnel_ipv6_gw .. "%6in4-omr6in4 | grep '100% packet loss'"))
if tunnel_ping6_test == "" then
mArray.openmptcprouter["tun6_state"] = "UP"
else
mArray.openmptcprouter["tun6_state"] = "DOWN"
end
else
mArray.openmptcprouter["tun6_state"] = "DOWN"
mArray.openmptcprouter["tun6_state"] = "UNKNOWN"
end
end
else