Skip to content
Snippets Groups Projects
Unverified Commit 051fd926 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-wan-dnsmasq: add interface name to link-local addresses

Fixes #854
parent 639c12b8
No related branches found
No related tags found
No related merge requests found
......@@ -12,14 +12,20 @@ local fs = require 'nixio.fs'
local new_servers = ''
local function append_servers(servers)
local function handle_interface(status)
local ifname = status.device
local servers = status.inactive['dns-server']
for _, server in ipairs(servers) do
if server:match('^fe80:') then
server = server .. '%' .. ifname
end
new_servers = new_servers .. 'nameserver ' .. server .. '\n'
end
end
local function append_interface_servers(iface)
append_servers(ubus:call('network.interface.' .. iface, 'status', {}).inactive['dns-server'])
handle_interface(ubus:call('network.interface.' .. iface, 'status', {}))
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment