proto_dslite.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. -- Copyright 2011 Jo-Philipp Wich <jow@openwrt.org>
  2. -- Copyright 2013 Steven Barth <steven@midlink.org>
  3. -- Licensed to the public under the Apache License 2.0.
  4. local map, section, net = ...
  5. local peeraddr, ip6addr
  6. local tunlink, defaultroute, metric, ttl, mtu
  7. peeraddr = section:taboption("general", Value, "peeraddr",
  8. translate("DS-Lite AFTR address"))
  9. peeraddr.rmempty = false
  10. peeraddr.datatype = "ip6addr"
  11. ip6addr = section:taboption("general", Value, "ip6addr",
  12. translate("Local IPv6 address"),
  13. translate("Leave empty to use the current WAN address"))
  14. ip6addr.datatype = "ip6addr"
  15. tunlink = section:taboption("advanced", DynamicList, "tunlink", translate("Tunnel Link"))
  16. tunlink.template = "cbi/network_netlist"
  17. tunlink.nocreate = true
  18. defaultroute = section:taboption("advanced", Flag, "defaultroute",
  19. translate("Default gateway"),
  20. translate("If unchecked, no default route is configured"))
  21. defaultroute.default = defaultroute.enabled
  22. metric = section:taboption("advanced", Value, "metric",
  23. translate("Use gateway metric"))
  24. metric.placeholder = "0"
  25. metric.datatype = "uinteger"
  26. metric:depends("defaultroute", defaultroute.enabled)
  27. ttl = section:taboption("advanced", Value, "ttl", translate("Use TTL on tunnel interface"))
  28. ttl.placeholder = "64"
  29. ttl.datatype = "range(1,255)"
  30. mtu = section:taboption("advanced", Value, "mtu", translate("Use MTU on tunnel interface"))
  31. mtu.placeholder = "1280"
  32. mtu.datatype = "max(9200)"