Skip to content

Commit

Permalink
Try to find why we have unknown status in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Sep 20, 2024
1 parent 44b8789 commit 8ae235c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,13 @@
cssc = 'rgb(144, 240, 144)';
statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png";
statusMessageClass = "warning";
statusMessage = "Some connectivity tests failed";
statusMessage = "Some connectivity tests failed" + '<br />';
default:
stat = 'Unknown';
cssc = 'rgb(144, 240, 144)';
statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png";
statusMessageClass = "warning";
statusMessage = "Unknown status";
statusMessage = "Unknown status (" + mArray.wans[i].status + ")" + '<br />';
}
// Populate info
var wanip = mArray.wans[i].wanip;
Expand Down
3 changes: 2 additions & 1 deletion openmptcprouter-api/files/usr/libexec/rpcd/openmptcprouter
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,7 @@ function interfaces_status()
local mac = section ["macaddr"] or ""
local itype = section ["type"] or ""
local state = uci:get("openmptcprouter", interface, "state") or ""
local connectivity = "OK"

--if not ipaddr or not gateway then return end
-- Don't show if0 in the overview
Expand Down Expand Up @@ -1311,7 +1312,7 @@ function interfaces_status()

if enabled == "0" then return end

local connectivity = "OK"
--local connectivity = "OK"
if ipaddr == "" and ifname ~= nil and ifname ~= "" and proto ~= "dhcpv6" then
ipaddr = ut.trim(sys.exec("ip -4 -br addr ls dev " .. ifname .. " | awk -F'[ /]+' '{print $3}' | tr -d '\n'"))
end
Expand Down

0 comments on commit 8ae235c

Please sign in to comment.