Fixes for subdns (#939)

* Fix display of service names so they support subdomains

* Add dnsmasq data to support dump

* Duplicate

* Check urls using FQDN as some targets care
This commit is contained in:
Tim Wilkinson 2023-09-19 20:04:38 -07:00 committed by GitHub
parent f6ffa4acb2
commit eab36f4788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -206,6 +206,9 @@ if validate then
vstate[service] = last
elseif proto == "http" then
-- http so looks like a link. http check it
if not hostname:match("%.local%.mesh$") then
hostname = hostname .. ".local.mesh"
end
local status, effective_url = io.popen("/usr/bin/curl --max-time 10 --retry 0 --connect-timeout 2 --speed-time 5 --speed-limit 1000 --silent --output /dev/null --location --write-out '%{http_code} %{url_effective}' " .. "http://" .. hostname .. ":" .. port .. path):read("*a"):match("^(%d+) (.*)")
if status == "200" or status == "401" then
vstate[service] = last

View File

@ -341,7 +341,7 @@ do
if path then
local name, originator = name:match("(.*%S)%s*#(.*)")
if originator == " my own service" or (hosts[originator] and hosts[originator].name) then
if not host:match("%.") then
if not host:match("%.local%.mesh$") then
host = host .. ".local.mesh"
end
if not services[host] then

View File

@ -63,6 +63,7 @@ local files = {
"/tmp/olsrd.log",
"/tmp/manager.log",
"/tmp/manager.log.0",
"/tmp/dnsmasq.d/",
"/tmp/AutoDistReset.log",
"/tmp/lqm.info",
"/tmp/wireless_monitor.info",