luci-portconfig: fix dns

This commit is contained in:
Nils Schneider 2014-08-10 17:13:39 +02:00
parent d90b1d66fd
commit 3652628e96

View File

@ -116,7 +116,7 @@ function f.handle(self, state, data)
uci:commit("network")
if dns then
if data.dns then
if #data.dns > 0 then
uci:set("gluon-wan-dnsmasq", dns, "server", data.dns)
else
uci:delete("gluon-wan-dnsmasq", dns, "server")