diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-01-07 20:48:05 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-01-07 20:48:05 +0000 |
commit | c8a2a3031b20c41222b95c3ab08f0bb45baafd90 (patch) | |
tree | a2b817b30e7f50a784d6527a61c78cae094c3957 /modules/admin-full | |
parent | 55ed5c897855d6597bbbd8e8ff4a3a4de285b73f (diff) |
modules/admin-full: fix default state and handling of the defaultroute and peerdns options
Diffstat (limited to 'modules/admin-full')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua | 8 |
1 files changed, 8 insertions, 0 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 267c41c9d..0530b5d57 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua @@ -216,12 +216,20 @@ if has_pppd or has_3g then ) defaultroute:depends("proto", "ppp") defaultroute:depends("proto", "3g") + defaultroute.rmempty = false + function defaultroute.cfgvalue(...) + return ( AbstractValue.cfgvalue(...) or '1' ) + end peerdns = s:option(Flag, "peerdns", translate("network_interface_peerdns"), translate("network_interface_peerdns_desc") ) peerdns:depends("proto", "ppp") + peerdns.rmempty = false + function peerdns.cfgvalue(...) + return ( AbstractValue.cfgvalue(...) or '1' ) + end ipv6 = s:option(Flag, "ipv6", translate("network_interface_ipv6") ) ipv6:depends("proto", "ppp") |