luci-mod-admin-full: correct logic for dnsmasq boguspriv keyword
authormuddyfeet <warren@linton.id.au>
Tue, 25 Apr 2017 11:52:04 +0000 (12:52 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 25 Apr 2017 12:40:18 +0000 (14:40 +0200)
Prevents deletion of the UCI dns boguspriv keyword and explicitly sets it to
either 0 or removes it as the LEDE/Openwrt dnsmasq.conf default is 1 - not 0.

This allows boguspriv to be turned off from the GUI.

Signed-off-by: Warren Linton <warren@linton.id.au>
[Jo-Philipp Wich: squashed commits, updated commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/dhcp.lua

index 10636a491a307cad7903a3446d21044e75d21e9f..f418ecb40f050db00a895a50d98b1bbac96c0b07 100644 (file)
@@ -68,9 +68,10 @@ se = s:taboption("advanced", Flag, "sequential_ip",
        translate("Allocate IP addresses sequentially, starting from the lowest available address"))
 se.optional = true
 
-s:taboption("advanced", Flag, "boguspriv",
+bp = s:taboption("advanced", Flag, "boguspriv",
        translate("Filter private"),
        translate("Do not forward reverse lookups for local networks"))
+bp.default = bp.enabled
 
 s:taboption("advanced", Flag, "filterwin2k",
        translate("Filter useless"),