Skip to content

Commit

Permalink
lime-proto-anygw: honour lime.system.domain setting, use as domain-se…
Browse files Browse the repository at this point in the history
…arch in DHCPv6 replies
  • Loading branch information
altergui committed Mar 20, 2017
1 parent a8418b3 commit 2766bfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/lime-proto-anygw/src/anygw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ function anygw.configure(args)

uci:save("dhcp")

local cloudDomain = config.get("system", "domain")

local content = { }
table.insert(content, "enable-ra")
table.insert(content, "dhcp-range=tag:anygw,"..ipv6:network():string()..",ra-names,24h")
table.insert(content, "dhcp-option=tag:anygw,option6:domain-search,lan")
table.insert(content, "dhcp-option=tag:anygw,option6:domain-search,"..cloudDomain)
fs.writefile("/etc/dnsmasq.d/lime-proto-anygw-20-ipv6.conf", table.concat(content, "\n").."\n")

io.popen("/etc/init.d/dnsmasq enable || true"):close()
Expand Down

0 comments on commit 2766bfd

Please sign in to comment.