Merge pull request #1735 from sumpfralle/olsr-jsoninfo-parser-handle-empty-result
[oweals/luci.git] / applications / luci-app-unbound / luasrc / model / cbi / unbound / configure.lua
index 8170f3d2be24156ebceb74201f7d2ac6a6199890..d1ea774085b888f2057d40c0f146c9891690ead3 100644 (file)
@@ -17,6 +17,8 @@ local ht = require "luci.http"
 local ds = require "luci.dispatcher"
 local ucl = luci.model.uci.cursor()
 local valman = ucl:get_first("unbound", "unbound", "manual_conf")
+local dhcplk = ucl:get_first("unbound", "unbound", "dhcp_link")
+local lstrig = ucl:get_first("dhcp", "odhcpd", "leasetrigger")
 
 m1 = Map("unbound")
 s1 = m1:section(TypedSection, "unbound", translate("Recursive DNS"),
@@ -29,6 +31,12 @@ s1 = m1:section(TypedSection, "unbound", translate("Recursive DNS"),
 s1.addremove = false
 s1.anonymous = true
 
+if (valman == "0") and (dhcplk == "odhcpd") and (lstrig ~= "/usr/lib/unbound/odhcpd.sh") then
+    m1.message = translatef( "Note: local DNS is configured to look at odhpcd, "
+    .. "but odhpcd UCI lease trigger is incorrectly set: ")
+    .. "dhcp.odhcpd.leasetrigger='" .. lstrig .. "'"
+end
+
 --LuCI, Unbound, or Not
 s1:tab("basic", translate("Basic"))
 
@@ -210,10 +218,11 @@ if (valman == "0") then
 
     pro = s1:taboption("resource", ListValue, "protocol",
         translate("Recursion Protocol"),
-        translate("Chose the protocol recursion queries leave on"))
+        translate("Chose the IP versions used upstream and downstream"))
     pro:value("default", translate("Default"))
     pro:value("ip4_only", translate("IP4 Only"))
-    pro:value("ip6_only", translate("IP6 Only"))
+    pro:value("ip6_local", translate("IP4 All and IP6 Local"))
+    pro:value("ip6_only", translate("IP6 Only*"))
     pro:value("ip6_prefer", translate("IP6 Preferred"))
     pro:value("mixed", translate("IP4 and IP6"))
     pro.rmempty = false
@@ -250,7 +259,7 @@ if (valman == "0") then
     qrs:depends("query_minimize", true)
 
     eds = s1:taboption("resource", Value, "edns_size",
-        translate("EDNS Size:"),
+        translate("EDNS Size"),
         translate("Limit extended DNS packet size"))
     eds.datatype = "and(uinteger,min(512),max(4096))"
     eds.placeholder = "1280"