Testing DNS function against lte interface
Skyweave Test, Lint, and Deploy Ritual / Test and Lint Code (push) Successful in 29s
Skyweave Test, Lint, and Deploy Ritual / Deploy to Roof Unit (push) Successful in 18s

This commit is contained in:
wes
2025-06-29 10:27:41 -04:00
parent fa793c1c1a
commit 3fd7a9bcbc
+5 -2
View File
@@ -11,14 +11,15 @@ function network_handler.get_network_config(request_context)
-- Ensure utils are available for these calls
local live_wan_dns_list, live_search_domains = utils.get_live_dns_servers_from_resolv(wan_iface_name)
local live_gateway_ip, live_gateway_iface = utils.get_active_default_gateway()
local live_wan_lte_dns_list, live__an_lte_search_domains = utils.get_live_dns_servers_from_resolv(wan_lte_iface_name)
-- get_live_interface_info returns: address, mask, device, leasetime, error_message
local live_wan_ip, live_wan_netmask, ifname, dhcp_lease_time, err_msg_live_info = utils.get_live_interface_info(wan_iface_name)
local station_info, err = utils.get_station_dump_info("vif-sta0")
-- Handle potential error from get_live_interface_info if needed, e.g. log err_msg_live_info
-- get current default gateway with _lowest_metric
local live_gateway_ip, live_gateway_iface = utils.get_active_default_gateway()
local response_data = { errCode = 0, errMsg = "OK"}
response_data.wan = {
@@ -54,6 +55,8 @@ function network_handler.get_network_config(request_context)
imei = utils.get_modem_imei() or "",
iccid = utils.get_sim_iccid() or "",
wan_gateway = utils.get_gateway_for_interface("wwan0") or "",
wan_dns1 = live_wan_dns_list and live_wan_dns_list[1] or "",
wan_dns2 = live_wan_dns_list and live_wan_dns_list[2] or ""
}
return response_data
end