Skip to content
Snippets Groups Projects
Commit 3652628e authored by Nils Schneider's avatar Nils Schneider
Browse files

luci-portconfig: fix dns

parent d90b1d66
No related branches found
No related tags found
No related merge requests found
......@@ -116,10 +116,10 @@ function f.handle(self, state, data)
uci:commit("network")
if dns then
if data.dns then
uci:set("gluon-wan-dnsmasq", dns, "server", data.dns)
if #data.dns > 0 then
uci:set("gluon-wan-dnsmasq", dns, "server", data.dns)
else
uci:delete("gluon-wan-dnsmasq", dns, "server")
uci:delete("gluon-wan-dnsmasq", dns, "server")
end
uci:save("gluon-wan-dnsmasq")
......
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