proto_dhcpv6.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. -- Copyright 2013 Steven Barth <steven@midlink.org>
  2. -- Licensed to the public under the Apache License 2.0.
  3. local map, section, net = ...
  4. local o = section:taboption("general", ListValue, "reqaddress",
  5. translate("Request IPv6-address"))
  6. o:value("try")
  7. o:value("force")
  8. o:value("none", "disabled")
  9. o.default = "try"
  10. o = section:taboption("general", Value, "reqprefix",
  11. translate("Request IPv6-prefix of length"))
  12. o:value("auto", translate("automatic"))
  13. o:value("no", translate("disabled"))
  14. o:value("48")
  15. o:value("52")
  16. o:value("56")
  17. o:value("60")
  18. o:value("64")
  19. o.default = "auto"
  20. o = section:taboption("advanced", Flag, "defaultroute",
  21. translate("Use default gateway"),
  22. translate("If unchecked, no default route is configured"))
  23. o.default = o.enabled
  24. o = section:taboption("advanced", Flag, "peerdns",
  25. translate("Use DNS servers advertised by peer"),
  26. translate("If unchecked, the advertised DNS server addresses are ignored"))
  27. o.default = o.enabled
  28. o = section:taboption("advanced", Value, "ip6prefix",
  29. translate("Custom delegated IPv6-prefix"))
  30. o.dataype = "ip6addr"
  31. o = section:taboption("advanced", DynamicList, "dns",
  32. translate("Use custom DNS servers"))
  33. o:depends("peerdns", "")
  34. o.datatype = "list(ip6addr)"
  35. o.cast = "string"
  36. o = section:taboption("advanced", Value, "clientid",
  37. translate("Client ID to send when requesting DHCP"))
  38. luci.tools.proto.opt_macaddr(section, ifc, translate("Override MAC address"))
  39. o = section:taboption("advanced", Value, "mtu", translate("Override MTU"))
  40. o.placeholder = "1500"
  41. o.datatype = "max(9200)"