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

Check if gateway exist

This commit is contained in:
Ycarus 2018-05-30 17:39:59 +02:00
parent 68da1a36a1
commit 33bfcb84f9
2 changed files with 8 additions and 1 deletions

View file

@ -314,6 +314,10 @@ function interfaces_status()
end
end
if gateway == "" then
connectivity = 'ERROR'
end
-- Detect if WAN get an IPv6
local ipv6_discover = 'NONE'
if tonumber((sys.exec("sysctl net.ipv6.conf.all.disable_ipv6")):match(" %d+")) == 0 then

View file

@ -194,7 +194,10 @@
{
statusMessage += 'No IP defined<br />'
}
if(gw_ping == 'DOWN')
if(gateway == '')
{
statusMessage += 'No gateway defined<br />'
} else if(gw_ping == 'DOWN')
{
statusMessage += 'Gateway DOWN<br />'
}