gluon-respondd: allow queries from extra_prefix6

Fixes #1959

(cherry picked from commit 3fb4cdad13)
This commit is contained in:
Martin Weinelt 2020-04-04 18:47:07 +02:00
parent 45b277bbd7
commit f7d0db69f9

View File

@ -25,6 +25,7 @@ uci:section('firewall', 'rule', 'client_respondd', {
target = 'ACCEPT', target = 'ACCEPT',
}) })
-- Allow respondd-access from within the mesh
uci:section('firewall', 'rule', 'mesh_respondd_ll', { uci:section('firewall', 'rule', 'mesh_respondd_ll', {
name = 'mesh_respondd_ll', name = 'mesh_respondd_ll',
src = 'mesh', src = 'mesh',
@ -43,4 +44,19 @@ uci:section('firewall', 'rule', 'mesh_respondd_siteprefix', {
target = 'ACCEPT', 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') uci:save('firewall')