Changeset 8695
- Timestamp:
- 06/03/12 19:19:13 (12 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
luci/trunk/protocols/core/luasrc/model/cbi/admin_network/proto_dhcp.lua
r8072 r8695 2 2 LuCI - Lua Configuration Interface 3 3 4 Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>4 Copyright 2011-2012 Jo-Philipp Wich <xm@subsignal.org> 5 5 6 6 Licensed under the Apache License, Version 2.0 (the "License"); … … 15 15 16 16 local hostname, accept_ra, send_rs 17 local bcast, no_gw, no_dns, dns, metric, clientid, vendorclass17 local bcast, no_gw, peerdns, dns, metric, clientid, vendorclass 18 18 19 19 … … 63 63 64 64 65 no_dns = section:taboption("advanced", Flag, "_no_dns",65 peerdns = section:taboption("advanced", Flag, "peerdns", 66 66 translate("Use DNS servers advertised by peer"), 67 67 translate("If unchecked, the advertised DNS server addresses are ignored")) 68 68 69 no_dns.default = no_dns.enabled 70 71 function no_dns.cfgvalue(self, section) 72 local addr 73 for addr in luci.util.imatch(m:get(section, "dns")) do 74 return self.disabled 75 end 76 return self.enabled 77 end 78 79 function no_dns.remove(self, section) 80 return m:del(section, "dns") 81 end 82 83 function no_dns.write() end 69 peerdns.default = peerdns.enabled 84 70 85 71 … … 87 73 translate("Use custom DNS servers")) 88 74 89 dns:depends(" _no_dns", "")75 dns:depends("peerdns", "") 90 76 dns.datatype = "ipaddr" 91 77 dns.cast = "string"
