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:
parent
68da1a36a1
commit
33bfcb84f9
2 changed files with 8 additions and 1 deletions
|
@ -314,6 +314,10 @@ function interfaces_status()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if gateway == "" then
|
||||||
|
connectivity = 'ERROR'
|
||||||
|
end
|
||||||
|
|
||||||
-- Detect if WAN get an IPv6
|
-- Detect if WAN get an IPv6
|
||||||
local ipv6_discover = 'NONE'
|
local ipv6_discover = 'NONE'
|
||||||
if tonumber((sys.exec("sysctl net.ipv6.conf.all.disable_ipv6")):match(" %d+")) == 0 then
|
if tonumber((sys.exec("sysctl net.ipv6.conf.all.disable_ipv6")):match(" %d+")) == 0 then
|
||||||
|
|
|
@ -194,7 +194,10 @@
|
||||||
{
|
{
|
||||||
statusMessage += 'No IP defined<br />'
|
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 />'
|
statusMessage += 'Gateway DOWN<br />'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue