1 -- Copyright 2011 Jo-Philipp Wich <xm@subsignal.org>
2 -- Licensed to the public under the Apache License 2.0.
4 local map, section, net = ...
7 local forward_bcast, forward_dhcp, gateway, expiry, retry, table
10 ipaddr = section:taboption("general", Value, "ipaddr",
11 translate("Local IPv4 address"),
12 translate("Address to access local relay bridge"))
14 ipaddr.datatype = "ip4addr"
17 network = s:taboption("general", DynamicList, "network", translate("Relay between networks"))
18 network.widget = "checkbox"
19 network.exclude = arg[1]
20 network.template = "cbi/network_netlist"
21 network.nocreate = true
22 network.nobridges = true
23 network.novirtual = true
24 network:depends("proto", "relay")
27 forward_bcast = section:taboption("advanced", Flag, "forward_bcast",
28 translate("Forward broadcast traffic"))
30 forward_bcast.default = forward_bcast.enabled
33 forward_dhcp = section:taboption("advanced", Flag, "forward_dhcp",
34 translate("Forward DHCP traffic"))
36 forward_dhcp.default = forward_dhcp.enabled
39 gateway = section:taboption("advanced", Value, "gateway",
40 translate("Use DHCP gateway"),
41 translate("Override the gateway in DHCP responses"))
43 gateway.datatype = "ip4addr"
44 gateway:depends("forward_dhcp", forward_dhcp.enabled)
47 expiry = section:taboption("advanced", Value, "expiry",
48 translate("Host expiry timeout"),
49 translate("Specifies the maximum amount of seconds after which hosts are presumed to be dead"))
51 expiry.placeholder = "30"
52 expiry.datatype = "min(1)"
55 retry = section:taboption("advanced", Value, "retry",
56 translate("ARP retry threshold"),
57 translate("Specifies the maximum amount of failed ARP requests until hosts are presumed to be dead"))
59 retry.placeholder = "5"
60 retry.datatype = "min(1)"
63 table = section:taboption("advanced", Value, "table",
64 translate("Use routing table"),
65 translate("Override the table used for internal routes"))
67 table.placeholder = "16800"
68 table.datatype = "range(0,65535)"