fixup! Gluon-core: Allow multiple domain names for next_node-feature

This commit is contained in:
Christof Schulze 2018-02-15 22:05:42 +01:00
parent 122bd5138c
commit 2e80dffa68
2 changed files with 6 additions and 8 deletions

View File

@ -174,12 +174,12 @@ next_node \: package
defaults to ``16:41:95:40:f7:dc``; this value usually doesn't need to be defaults to ``16:41:95:40:f7:dc``; this value usually doesn't need to be
changed, but it can be adjusted to match existing deployments that use a changed, but it can be adjusted to match existing deployments that use a
different value. Each entry in the ``name``-field will be resolved to the different value. Each entry in the ``name``-field will be resolved to the
ipv4 and ipv6-address. IPv4 and IPv6-address.
For this to work, clients must use the next-node as their resolver. In For this to work, clients must use the next-node as their resolver. In
batman-based networks this requires setting the central dhcp server to batman-based networks this requires setting the central DHCP server to
deliver this address as DNS-server via DHCP-option. When running a radvd deliver this address as DNS server via DHCP option. When running a radvd
inside the network, this should be set to deliver the next-node inside the network, this should be set to deliver the next-node
ipv6-address via rdnss. IPv6-address via rdnss.
mesh \: optional mesh \: optional
Options specific to routing protocols. Options specific to routing protocols.

View File

@ -33,10 +33,8 @@ local function set_dns_record(name, ip, sectionname)
}) })
end end
uci:foreach("dhcp", "domain", function(s) uci:delete_all('dhcp', 'domain', function(s)
if (s['.name'] and string.match(s['.name'], "^nextnode[46]_")) then return (s['.name'] and string.match(s['.name'], "^nextnode[46]"))
uci:delete("dhcp", s['.name'])
end
end) end)
for i, name in ipairs(next_node.name or {}) do for i, name in ipairs(next_node.name or {}) do