Skip to content
Snippets Groups Projects
Commit b3d70111 authored by Christof Schulze's avatar Christof Schulze Committed by Andreas Ziegler
Browse files

gluon-core: make sure dns traffic leaves the correct interface when there is ipv6 wan uplink

parent 0f9ab5e3
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,13 @@ uci:delete('dhcp', dnsmasq, 'cachesize') ...@@ -16,6 +16,13 @@ uci:delete('dhcp', dnsmasq, 'cachesize')
uci:delete('firewall', 'client_dns') uci:delete('firewall', 'client_dns')
if dns.servers then if dns.servers then
localipv6 = uci:get("network", "loopback", "ip6addr")
-- below is an ugly hack that makes sure the dns upstream traffic is leaving the correct network interface.
appended = {}
for i,s in ipairs(dns.servers) do
table.insert(appended, s .. "@" .. string.sub(localipv6,0, string.find(localipv6,"/")-1 ) )
end
uci:set('dhcp', dnsmasq, 'server', appended )
-- allow inbound traffic for dns from client zone -- allow inbound traffic for dns from client zone
uci:section('firewall', 'rule', 'client_dns', { uci:section('firewall', 'rule', 'client_dns', {
src = 'local_client', src = 'local_client',
......
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