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

Add filter_aaa dnsmasq setting info in local API

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-05-23 15:42:06 +02:00
parent 7f695c77ba
commit c1d3318f5e
2 changed files with 13 additions and 1 deletions

View file

@ -232,7 +232,7 @@ local statuslogo = ucic:get("openmptcprouter","settings","statuslogo") or "openm
if (mArray.openmptcprouter.tun6_state == "DOWN")
{
statusMessage += '<%:IPv6 tunnel DOWN%>' + '<br/>';
} else if (mArray.openmptcprouter.wan_addr6 == '')
} else if (mArray.openmptcprouter.wan_addr6 == '' && mArray.openmptcprouter.dns_filter_aaaa == false)
{
statusMessage += '<%:No IPv6 access%>' + '<br/>';
}

View file

@ -793,6 +793,12 @@ function interfaces_status()
if net then
ipaddr = net:ipaddr()
end
if ipaddr == "" then
net = ntm:get_network("LAN")
if net then
ipaddr = net:ipaddr()
end
end
mArray.openmptcprouter["local_addr"] = ipaddr
--mArray.openmptcprouter["local_addr"] = uci:get("network", "lan", "ipaddr")
mArray.openmptcprouter["hostname"] = "OpenMPTCProuter"
@ -813,6 +819,12 @@ function interfaces_status()
if dns_test == "" then
mArray.openmptcprouter["dns"] = true
end
if uci:get("dhcp","dnsmasq1","filter_aaa") == "1" then
mArray.openmptcprouter["dns_filter_aaa"] = true
end
if uci:get("dhcp","dnsmasq1","filter_a") == "1" then
mArray.openmptcprouter["dns_filter_a"] = true
end
mArray.openmptcprouter["ipv6"] = "disabled"
if uci:get("openmptcprouter","settings","disable_ipv6") ~= "1" then