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

Check if tun dev not false

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-08-31 15:22:02 +02:00
parent 8420160fab
commit 6d3898435d

View file

@ -773,7 +773,7 @@ function interfaces_status()
if tun_dev == "" then
tun_dev = get_device("omrvpn")
end
if tun_dev ~= "" then
if tun_dev ~= "" and tun_dev ~= false then
local peer = get_gateway("omrvpn")
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'"))