mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix gw check in status page
This commit is contained in:
parent
9c3ed6acc9
commit
ddb427aadf
1 changed files with 2 additions and 2 deletions
|
@ -274,7 +274,7 @@ function interfaces_status()
|
|||
local tun_dev = uci:get("network","omrvpn","ifname")
|
||||
if tun_dev ~= "" then
|
||||
local peer = get_gateway("omrvpn")
|
||||
if peer ~= "" then
|
||||
if peer == "" then
|
||||
peer = ut.trim(sys.exec("ip -4 r list dev " .. tun_dev .. " | grep kernel | awk '/proto kernel/ {print $1}' | grep -v / | tr -d '\n'"))
|
||||
end
|
||||
if peer ~= "" then
|
||||
|
@ -374,7 +374,7 @@ function interfaces_status()
|
|||
if gateway == "" then
|
||||
gateway = get_gateway(interface)
|
||||
end
|
||||
if gateway ~= "" then
|
||||
if gateway == "" then
|
||||
gateway = ut.trim(sys.exec("ip -4 r list dev " .. ifname .. " | grep kernel | awk '/proto kernel/ {print $1}' | grep -v / | tr -d '\n'"))
|
||||
end
|
||||
if gateway ~= "" then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue