gluon-respondd: allow queries from extra_prefix6

Fixes #1959
This commit is contained in:
Martin Weinelt 2020-04-04 18:47:07 +02:00 committed by Martin Weinelt
parent c21d95bf34
commit 3fb4cdad13

View File

@ -25,6 +25,7 @@ uci:section('firewall', 'rule', 'client_respondd', {
target = 'ACCEPT',
})
-- Allow respondd-access from within the mesh
uci:section('firewall', 'rule', 'mesh_respondd_ll', {
name = 'mesh_respondd_ll',
src = 'mesh',
@ -43,4 +44,19 @@ uci:section('firewall', 'rule', 'mesh_respondd_siteprefix', {
target = 'ACCEPT',
})
uci:delete_all('firewall', 'rule', function(rule)
return rule['.name']:find('^mesh_respondd_extraprefix')
end)
for idx, prefix in ipairs(site.extra_prefixes6({})) do
uci:section('firewall', 'rule', 'mesh_respondd_extraprefix' .. idx, {
name = 'mesh_respondd_extraprefix' .. idx,
src = 'mesh',
src_ip = prefix,
dest_port = '1001',
proto = 'udp',
target = 'ACCEPT',
})
end
uci:save('firewall')