Skip to content

Commit

Permalink
Resolve server IP in API
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Jan 24, 2024
1 parent 67dc34b commit 612607e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmptcprouter-api/files/usr/libexec/rpcd/openmptcprouter
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ function interfaces_status()
local master = uci:get("openmptcprouter",s[".name"],"master") or "1"
local current = uci:get("openmptcprouter",s[".name"],"current") or "0"
for key, value in pairs(serverips) do
serverip = value
serverip = sys.exec('resolveip ' .. value .. ' | head -n 1')
if serverip ~= "" and (current == "1" or mArray.openmptcprouter["wan_addr"] == serverip or mArray.openmptcprouter["wan_addr6"] == serverip) and mArray.openmptcprouter["vps_admin"] == false then
mArray.openmptcprouter["vps_omr_version"] = uci:get("openmptcprouter", s[".name"], "omr_version") or ""
mArray.openmptcprouter["vps_kernel"] = uci:get("openmptcprouter",s[".name"],"kernel") or ""
Expand Down

0 comments on commit 612607e

Please sign in to comment.