Add configuration for MDNS forwarder

This commit is contained in:
Alfredo Cardigliano 2023-03-30 18:55:06 +02:00
parent f69a959f06
commit 7a4ea040c4
4 changed files with 35 additions and 1 deletions

View file

@ -1095,6 +1095,16 @@ end
-- ##############################################
function system_config:isMDNSRepeaterEnabled()
return self.config.globals.mdns_repeater
end
function system_config:setMDNSRepeaterEnabled(enabled)
self.config.globals.mdns_repeater = ternary(enabled, true, false)
end
-- ##############################################
-- NOTE: can't rely on the main routing table when having multiple gateways!
function system_config._interface_get_default_gateway(iface)
local res = sys_utils.execShellCmd("ip route show | grep \"^default via\" | grep \"" .. iface .. "\"")