From 1824b945c8ced82eeef3ef463e2acc389073f1dc Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Sun, 21 Aug 2022 21:58:19 -0700 Subject: [PATCH] Dont validate hostname in NAT mode. Hostname is always valid for NAT but not in the valid_hosts table. --- files/usr/local/bin/olsrd-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/usr/local/bin/olsrd-config b/files/usr/local/bin/olsrd-config index e1135500..90d235d7 100755 --- a/files/usr/local/bin/olsrd-config +++ b/files/usr/local/bin/olsrd-config @@ -173,7 +173,7 @@ if validate then for _, service in ipairs(services) do local proto, hostname, port, path = service:match("^(%w+)://([%w%-%.]+):(%d+)(.*)|...|[^|]+$") - if valid_hosts[hostname:lower()] then + if valid_hosts[hostname:lower()] or dmz_mode == "0" then if port == "0" then -- no port so not a link - we can only check the hostname so have to assume the service is good valid_services[#valid_services + 1] = service