summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-10-02 01:34:54 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-10-02 01:34:54 +0000
commit8c675f6a6ccd30c79fbc2d624b9ce2e6d7375d66 (patch)
tree750152750b049dcfff9c58de2dbcbaa764296da2 /modules/admin-full/luasrc
parent247b38ae393cc234e7d42f8506abc0ff3966ec3e (diff)
modules/admin-full: only render ipv6 options if ipv6 is available
Diffstat (limited to 'modules/admin-full/luasrc')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua24
1 files changed, 14 insertions, 10 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
index 4a48e9f6d..6bee998b6 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua
@@ -154,11 +154,13 @@ gw.rmempty = true
bcast = s:taboption("general", Value, "bcast", translate("broadcast"))
bcast:depends("proto", "static")
-ip6addr = s:taboption("ipv6", Value, "ip6addr", translate("ip6address"), translate("cidr6"))
-ip6addr:depends("proto", "static")
+if has_ipv6 then
+ ip6addr = s:taboption("ipv6", Value, "ip6addr", translate("ip6address"), translate("cidr6"))
+ ip6addr:depends("proto", "static")
-ip6gw = s:taboption("ipv6", Value, "ip6gw", translate("gateway6"))
-ip6gw:depends("proto", "static")
+ ip6gw = s:taboption("ipv6", Value, "ip6gw", translate("gateway6"))
+ ip6gw:depends("proto", "static")
+end
dns = s:taboption("general", Value, "dns", translate("dnsserver"))
dns:depends("peerdns", "")
@@ -281,12 +283,14 @@ if has_pptp or has_pppd or has_pppoe or has_pppoa or has_3g then
return ( AbstractValue.cfgvalue(...) or '1' )
end
- ipv6 = s:taboption("general", Flag, "ipv6", translate("network_interface_ipv6") )
- ipv6:depends("proto", "ppp")
- ipv6:depends("proto", "pppoa")
- ipv6:depends("proto", "pppoe")
- ipv6:depends("proto", "pptp")
- ipv6:depends("proto", "3g")
+ if has_ipv6 then
+ ipv6 = s:taboption("general", Flag, "ipv6", translate("network_interface_ipv6") )
+ ipv6:depends("proto", "ppp")
+ ipv6:depends("proto", "pppoa")
+ ipv6:depends("proto", "pppoe")
+ ipv6:depends("proto", "pptp")
+ ipv6:depends("proto", "3g")
+ end
connect = s:taboption("general", Value, "connect",
translate("network_interface_connect"),