Merge pull request #1290 from aparcar/uhttpd-mod-ubus
authorJo-Philipp Wich <jo@mein.io>
Sun, 13 Aug 2017 13:05:33 +0000 (15:05 +0200)
committerGitHub <noreply@github.com>
Sun, 13 Aug 2017 13:05:33 +0000 (15:05 +0200)
luci-app-attendedsysupgrade: add missing dep

15 files changed:
applications/luci-app-attendedsysupgrade/luasrc/view/attendedsysupgrade.htm
applications/luci-app-mwan3/luasrc/controller/mwan3.lua
applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua [new file with mode: 0644]
applications/luci-app-mwan3/luasrc/model/cbi/mwan/interfaceconfig.lua
applications/luci-app-mwan3/po/ja/mwan3.po
applications/luci-app-mwan3/po/templates/mwan3.pot
applications/luci-app-mwan3/po/zh-cn/mwan3.po
applications/luci-app-mwan3/root/etc/uci-defaults/60_luci-mwan3
applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua
applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua
applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_edit.lua
applications/luci-app-travelmate/luasrc/model/cbi/travelmate/wifi_order.lua
applications/luci-app-travelmate/luasrc/view/travelmate/stations.htm
applications/luci-app-travelmate/luasrc/view/travelmate/wifi_scan.htm
modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua

index 4f8bf7c..759949d 100644 (file)
@@ -1,12 +1,11 @@
 <%+header%>
 <h2 name="content"><%:Attended Sysupgrade%></h2>
-<div  class="container">
-       <div style="display: none" id="update_info" class="alert-message info">
-       </div>
-       <div style="display: none" id="update_error" class="alert-message danger">
-       </div>
+<div class="container">
+       <div style="display: none" id="update_info" class="alert-message info"></div>
+       <div style="display: none" id="update_error" class="alert-message danger"></div>
 </div>
 <input class="cbi-button" value="search for updates" onclick="update_request()" type="button" id="update_button">
+<div style="display: none" id="packages" class="alert-message success"></div>
 
 <script type="text/javascript">
 
@@ -22,7 +21,6 @@ function server_request(request_dict, path, callback) {
        request_dict.distro = data.release.distribution;
        request_dict.target = data.release.target.split("\/")[0];
        request_dict.subtarget = data.release.target.split("\/")[1];
-       request_dict.packages = data.packagelist;
        var xmlhttp = new XMLHttpRequest();
        xmlhttp.open("POST", url, true);
        xmlhttp.setRequestHeader("Content-type", "application/json");
@@ -37,7 +35,6 @@ function server_request(request_dict, path, callback) {
 
 // requests ubus via rpcd
 function ubus_request(command, argument, params, callback) {
-       // perform login if ubus_rpc_session is empty
        var request_data = '{ "jsonrpc": "2.0", "id": ' + ubus_counter + ', "method": "call", "params": [ "'+ data["ubus_rpc_session"] +'", "' + command + '", "' + argument + '", ' + params + ' ] }'
        ubus_counter++
        var xmlhttp = new XMLHttpRequest();
@@ -107,6 +104,7 @@ function update_request() {
        console.log("update_request")
        request_dict = {}
        request_dict.version = data.release.version;
+       request_dict.packages = data.packagelist;
        server_request(request_dict, "update-request", update_request_callback)
 }
 
@@ -161,11 +159,16 @@ function back_online_callback(response_object) {
 function update_request_200(response_content) {
        info_output = ""
        if(response_content.version != undefined) {
-               info_output += "new update available. from " + data.release.version + " to " + response_content.version
+               info_output += "<h3>new update available</h3>"
+               info_output += data.release.version + " to " + response_content.version
                latest_version = response_content.version;
        }
-       if(response_content.packages != undefined) {
-               info_output += "package updates available"
+       if(response_content.updates != undefined) {
+               info_output += "<h3>package updates available</h3>"
+               for (update in response_content.updates) {
+                       info_output += "<b>" + update + "</b>: " + response_content.updates[update][1] + " to " + response_content.updates[update][0] + "</br>"
+               }
+               data.packages = response_content.packages
        }
        update_info(info_output)
        document.getElementById("update_button").value = "request image";
@@ -178,6 +181,7 @@ function image_request() {
        request_dict = {}
        request_dict.version = latest_version;
        request_dict.board = data.board_name
+       request_dict.packages = data.packages;
        server_request(request_dict, "image-request", image_request_handler)
 }
 
@@ -211,7 +215,7 @@ function image_request_handler(response) {
                // ready to download
                response_content = JSON.parse(response.responseText)
                update_info("image created")
-               document.getElementById("update_button").value = "download and flash"
+               document.getElementById("update_button").value = "sysupgrade"
                document.getElementById("update_button").onclick = function() {download_image(response_content.url); }
        }
 }
index ca39c9b..c24beda 100644 (file)
@@ -29,6 +29,8 @@ function index()
        entry({"admin", "network", "mwan", "configuration"},
                alias("admin", "network", "mwan", "configuration", "interface"),
                _("Configuration"), 20)
+       entry({"admin", "network", "mwan", "configuration", "globals"},
+               cbi("mwan/globalsconfig"),_("Globals"), 5).leaf = true
        entry({"admin", "network", "mwan", "configuration", "interface"},
                arcombine(cbi("mwan/interface"), cbi("mwan/interfaceconfig")),
                _("Interfaces"), 10).leaf = true
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua
new file mode 100644 (file)
index 0000000..54d20bd
--- /dev/null
@@ -0,0 +1,32 @@
+--[[
+LuCI - Lua Configuration Interface
+
+Copyright 2017 Florian Eckert <fe@dev.tdt.de>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+]]--
+
+local net = require "luci.model.network".init()
+
+m = Map("mwan3")
+
+s = m:section(NamedSection, "globals", "globals", translate("Globals mwan3 options"))
+n = s:option(ListValue, "local_source",
+       translate("Local source interface"),
+       translate("Use the IP address of this interface as source IP address for traffic initiated by the router itself"))
+n:value("none")
+n.default = "none"
+for _, net in ipairs(net:get_networks()) do
+       if net:name() ~= "loopback" then
+               n:value(net:name())
+       end
+end
+n.rmempty = false
+
+return m
index 2b46376..ab44ba6 100644 (file)
@@ -102,6 +102,12 @@ enabled = mwan_interface:option(ListValue, "enabled", translate("Enabled"))
        enabled:value("1", translate("Yes"))
        enabled:value("0", translate("No"))
 
+initial_state = mwan_interface:option(ListValue, "initial_state", translate("Initial state"),
+       translate("Expect interface state on up event"))
+       initial_state.default = "online"
+       initial_state:value("online", translate("Online"))
+       initial_state:value("offline", translate("Offline"))
+
 family = mwan_interface:option(ListValue, "family", translate("Internet Protocol"))
        family.default = "ipv4"
        family:value("ipv4", translate("IPv4"))
@@ -183,6 +189,10 @@ failure = mwan_interface:option(Value, "failure_interval", translate("Failure in
        failure:value("1800", translatef("%d minutes", 30))
        failure:value("3600", translatef("%d hour", 1))
 
+keep_failure = mwan_interface:option(Flag, "keep_failure_interval", translate("Keep failure interval"),
+       translate("Keep ping failure interval during failure state"))
+       keep_failure.default = keep_failure.disabled
+
 recovery = mwan_interface:option(Value, "recovery_interval", translate("Recovery interval"),
        translate("Ping interval during failure recovering"))
        recovery.default = "5"
index f6a70c3..89fa5ea 100644 (file)
@@ -94,6 +94,9 @@ msgstr "トラブルシューティング情報の収集エラー"
 msgid "Errors"
 msgstr "エラー"
 
+msgid "Expect interface state on up event"
+msgstr ""
+
 msgid "Failure interval"
 msgstr "障害検出 インターバル"
 
@@ -103,6 +106,12 @@ msgstr ""
 msgid "Flush global firewall conntrack table on interface events"
 msgstr ""
 
+msgid "Globals"
+msgstr ""
+
+msgid "Globals mwan3 options"
+msgstr ""
+
 msgid "Hotplug Script"
 msgstr "ホットプラグ スクリプト"
 
@@ -121,6 +130,9 @@ msgstr "IPv4"
 msgid "IPv6"
 msgstr "IPv6"
 
+msgid "Initial state"
+msgstr ""
+
 msgid "Interface"
 msgstr "インターフェース"
 
@@ -144,6 +156,12 @@ msgstr "インターフェース"
 msgid "Internet Protocol"
 msgstr "インターネット プロトコル"
 
+msgid "Keep failure interval"
+msgstr ""
+
+msgid "Keep ping failure interval during failure state"
+msgstr ""
+
 msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
 msgstr "直近の MWAN システムログ(50行)です。一番上が最新の行です:"
 
@@ -156,6 +174,9 @@ msgstr "負荷分散"
 msgid "Loading"
 msgstr "読込中"
 
+msgid "Local source interface"
+msgstr ""
+
 msgid "MWAN Config"
 msgstr "MWAN 設定"
 
@@ -277,6 +298,9 @@ msgstr "プロトコルが設定されていません"
 msgid "Offline"
 msgstr "オフライン"
 
+msgid "Online"
+msgstr ""
+
 msgid "Online (tracking active)"
 msgstr "オンライン(追跡実行中)"
 
@@ -477,6 +501,11 @@ msgstr "トラブルシューティング"
 msgid "Troubleshooting Data"
 msgstr "トラブルシューティング データ"
 
+msgid ""
+"Use the IP address of this interface as source IP address for traffic "
+"initiated by the router itself"
+msgstr ""
+
 msgid "View the contents of /etc/protocols for protocol descriptions"
 msgstr "プロトコルの説明については、 /etc/protocols の内容を確認してください。"
 
index 3d25e84..8694298 100644 (file)
@@ -79,6 +79,9 @@ msgstr ""
 msgid "Errors"
 msgstr ""
 
+msgid "Expect interface state on up event"
+msgstr ""
+
 msgid "Failure interval"
 msgstr ""
 
@@ -88,6 +91,12 @@ msgstr ""
 msgid "Flush global firewall conntrack table on interface events"
 msgstr ""
 
+msgid "Globals"
+msgstr ""
+
+msgid "Globals mwan3 options"
+msgstr ""
+
 msgid "Hotplug Script"
 msgstr ""
 
@@ -106,6 +115,9 @@ msgstr ""
 msgid "IPv6"
 msgstr ""
 
+msgid "Initial state"
+msgstr ""
+
 msgid "Interface"
 msgstr ""
 
@@ -127,6 +139,12 @@ msgstr ""
 msgid "Internet Protocol"
 msgstr ""
 
+msgid "Keep failure interval"
+msgstr ""
+
+msgid "Keep ping failure interval during failure state"
+msgstr ""
+
 msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
 msgstr ""
 
@@ -139,6 +157,9 @@ msgstr ""
 msgid "Loading"
 msgstr ""
 
+msgid "Local source interface"
+msgstr ""
+
 msgid "MWAN Config"
 msgstr ""
 
@@ -245,6 +266,9 @@ msgstr ""
 msgid "Offline"
 msgstr ""
 
+msgid "Online"
+msgstr ""
+
 msgid "Online (tracking active)"
 msgstr ""
 
@@ -408,6 +432,11 @@ msgstr ""
 msgid "Troubleshooting Data"
 msgstr ""
 
+msgid ""
+"Use the IP address of this interface as source IP address for traffic "
+"initiated by the router itself"
+msgstr ""
+
 msgid "View the contents of /etc/protocols for protocol descriptions"
 msgstr ""
 
index 1e0f34f..3c505d8 100644 (file)
@@ -82,6 +82,9 @@ msgstr "收集故障排除信息时出错"
 msgid "Errors"
 msgstr "错误"
 
+msgid "Expect interface state on up event"
+msgstr ""
+
 msgid "Failure interval"
 msgstr "故障检测间隔"
 
@@ -91,6 +94,12 @@ msgstr "刷新连接跟踪表"
 msgid "Flush global firewall conntrack table on interface events"
 msgstr "在接口事件触发时刷新全局防火墙连接跟踪表"
 
+msgid "Globals"
+msgstr ""
+
+msgid "Globals mwan3 options"
+msgstr ""
+
 msgid "Hotplug Script"
 msgstr "Hotplug 脚本"
 
@@ -109,6 +118,9 @@ msgstr "IPv4"
 msgid "IPv6"
 msgstr "IPv6"
 
+msgid "Initial state"
+msgstr ""
+
 msgid "Interface"
 msgstr "接口"
 
@@ -130,6 +142,12 @@ msgstr "接口"
 msgid "Internet Protocol"
 msgstr "互联网协议"
 
+msgid "Keep failure interval"
+msgstr ""
+
+msgid "Keep ping failure interval during failure state"
+msgstr ""
+
 msgid "Last 50 MWAN systemlog entries. Newest entries sorted at the top :"
 msgstr "最近 50 条 MWAN 系统日志,最新条目排在顶部:"
 
@@ -142,6 +160,9 @@ msgstr "负载均衡"
 msgid "Loading"
 msgstr "载入中"
 
+msgid "Local source interface"
+msgstr ""
+
 msgid "MWAN Config"
 msgstr "MWAN 配置文件"
 
@@ -260,6 +281,9 @@ msgstr "未指定协议"
 msgid "Offline"
 msgstr "离线"
 
+msgid "Online"
+msgstr ""
+
 msgid "Online (tracking active)"
 msgstr "在线(追踪启用中)"
 
@@ -443,6 +467,11 @@ msgstr "故障排除"
 msgid "Troubleshooting Data"
 msgstr "故障排除数据"
 
+msgid ""
+"Use the IP address of this interface as source IP address for traffic "
+"initiated by the router itself"
+msgstr ""
+
 msgid "View the contents of /etc/protocols for protocol descriptions"
 msgstr "请查看 /etc/protocols 获取可选协议详情"
 
index ff9a229..509a694 100755 (executable)
@@ -8,6 +8,13 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
+uci -q get mwan3.globals >/dev/null || {
+       uci -q add mwan3 globals >/dev/null
+       uci -q rename mwan3.@globals[-1]="globals" >/dev/null
+       uci -q set mwan3.globals.initial_source="none" >/dev/null
+       uci commit mwan3
+}
+
 # remove LuCI cache
 rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
 
index 63f7ba3..0a14f33 100644 (file)
@@ -156,6 +156,9 @@ function cfgvalue_overview_(sdata, lines, names)
        for _, n in ipairs(names) do
                local v = sdata[n]
                if v ~= nil then
+                       if n == "key" or n == "password" then
+                               v = translate("<hidden>")
+                       end
                        local fv = "<var>%s</var>" % ut.pcdata(v)
                        if sdata[".type"] ~= "ss_server" and n == "server" then
                                fv = '<a class="label" href="%s">%s</a>' % {
index b16fb41..add5231 100644 (file)
@@ -4,8 +4,8 @@
 local fs = require("nixio.fs")
 local uci = require("luci.model.uci").cursor()
 local json = require("luci.jsonc")
-local nw  = require("luci.model.network").init()
-local fw  = require("luci.model.firewall").init()
+local nw = require("luci.model.network").init()
+local fw = require("luci.model.firewall").init()
 local trmiface = uci.get("travelmate", "global", "trm_iface") or "trm_wwan"
 local trminput = uci.get("travelmate", "global", "trm_rtfile") or "/tmp/trm_runtime.json"
 local uplink = uci.get("network", trmiface) or ""
@@ -18,7 +18,7 @@ m = Map("travelmate", translate("Travelmate"),
        .. "see online documentation</a>", "https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md"))
 
 function m.on_after_commit(self)
-       luci.sys.call("/etc/init.d/travelmate restart >/dev/null 2>&1")
+       luci.sys.call("env -i /etc/init.d/travelmate restart >/dev/null 2>&1")
        luci.http.redirect(luci.dispatcher.build_url("admin", "services", "travelmate"))
 end
 
@@ -27,36 +27,38 @@ s = m:section(NamedSection, "global", "travelmate")
 -- Interface Wizard
 
 if uplink == "" then
-       dv = s:option(DummyValue, "nil", translate("Interface Wizard"))
+       dv = s:option(DummyValue, "", translate("Interface Wizard"))
        dv.template = "cbi/nullsection"
 
-       o = s:option(Value, "trm_iface", translate("Uplink interface"))
+       o = s:option(Value, "", translate("Uplink interface"))
        o.datatype = "and(uciname,rangelength(3,15))"
-       o.default = "trm_wwan"
+       o.default = trmiface
        o.rmempty = false
 
-       btn = s:option(Button, "", translate("Create Uplink Interface"),
+       btn = s:option(Button, "trm_iface", translate("Create Uplink Interface"),
                translate("Create a new wireless wan uplink interface, configure it to use dhcp and ")
                .. translate("add it to the wan zone of the firewall. This step has only to be done once."))
        btn.inputtitle = translate("Add Interface")
        btn.inputstyle = "apply"
        btn.disabled = false
        function btn.write(self, section, value)
-               iface = o:formvalue(section)
-               uci:set("travelmate", section, "trm_iface", iface)
-               uci:save("travelmate")
-               uci:commit("travelmate")
-               local net = nw:add_network(iface, { proto = "dhcp" })
-               if net then
-                       nw:save("network")
-                       nw:commit("network")
-                       local zone = fw:get_zone_by_network("wan")
-                       if zone then
-                               zone:add_network(iface)
-                               fw:save("firewall")
-                               fw:commit("firewall")
-                               luci.sys.call("env -i /bin/ubus call network reload >/dev/null 2>&1")
+               local iface = o:formvalue(section)
+               if iface then
+                       uci:set("travelmate", section, "trm_iface", iface)
+                       uci:save("travelmate")
+                       uci:commit("travelmate")
+                       local net = nw:add_network(iface, { proto = "dhcp" })
+                       if net then
+                               nw:save("network")
+                               nw:commit("network")
+                               local zone = fw:get_zone_by_network("wan")
+                               if zone then
+                                       zone:add_network(iface)
+                                       fw:save("firewall")
+                                       fw:commit("firewall")
+                               end
                        end
+                       luci.sys.call("env -i /bin/ubus call network reload >/dev/null 2>&1")
                end
                luci.http.redirect(luci.dispatcher.build_url("admin", "services", "travelmate"))
        end
@@ -80,7 +82,7 @@ btn.inputtitle = translate("Rescan")
 btn.inputstyle = "find"
 btn.disabled = false
 function btn.write()
-       luci.sys.call("/etc/init.d/travelmate start >/dev/null 2>&1")
+       luci.sys.call("env -i /etc/init.d/travelmate start >/dev/null 2>&1")
        luci.http.redirect(luci.dispatcher.build_url("admin", "services", "travelmate"))
 end
 
@@ -162,6 +164,7 @@ translate("Options for further tweaking in case the defaults are not suitable fo
 
 e1 = e:option(Value, "trm_radio", translate("Radio selection"),
        translate("Restrict travelmate to a dedicated radio, e.g. 'radio0'"))
+e1.datatype = "and(uciname,rangelength(6,6))"
 e1.rmempty = true
 
 e2 = e:option(Value, "trm_maxretry", translate("Connection Limit"),
@@ -179,7 +182,7 @@ e3.rmempty = false
 e4 = e:option(Value, "trm_timeout", translate("Overall Timeout"),
        translate("Timeout in seconds between retries in 'automatic' mode"))
 e4.default = 60
-e4.datatype = "range(5,300)"
+e4.datatype = "range(60,300)"
 e4.rmempty = false
 
 return m
index 6d6bdcf..c60ff22 100644 (file)
@@ -22,10 +22,15 @@ local s = uci:get_all("wireless", m.hidden.cfg)
 if s ~= nil then
        wssid = m:field(Value, "ssid", translate("SSID"))
        wssid.default = s.ssid
+       wssid.datatype = "rangelength(1,32)"
        if s.encryption and s.key then
                wkey = m:field(Value, "key", translatef("Passphrase (%s)", s.encryption))
+       elseif s.encryption and s.password then
+               wkey = m:field(Value, "password", translatef("Passphrase (%s)", s.encryption))
+       end
+       if s.encryption and (s.key or s.password) then
                wkey.password = true
-               wkey.default = s.key
+               wkey.default = s.key or s.password
                if s.encryption == "wep" then
                        wkey.datatype = "wepkey"
                else
@@ -40,6 +45,8 @@ function wssid.write(self, section, value)
        uci:set("wireless", m.hidden.cfg, "ssid", wssid:formvalue(section))
        if s.encryption and s.key then
                uci:set("wireless", m.hidden.cfg, "key", wkey:formvalue(section))
+       elseif s.encryption and s.password then
+               uci:set("wireless", m.hidden.cfg, "password", wkey:formvalue(section))
        end
        uci:save("wireless")
        uci:commit("wireless")
index 5b6141e..6eb4c72 100644 (file)
@@ -8,13 +8,12 @@ local uci = require("luci.model.uci").cursor()
 local trmiface = uci:get("travelmate", "global", "trm_iface") or "trm_wwan"
 
 if cfg ~= nil then
-       local iface = ""
        local section = ""
        local idx = ""
        local idx_change = ""
        local changed = ""
        uci:foreach("wireless", "wifi-iface", function(s)
-               iface = s.network
+               local iface = s.network or ""
                if iface == trmiface then
                        section = s['.name']
                        if cfg == section then
index 41c9f52..cbb6c18 100644 (file)
@@ -5,7 +5,7 @@ This is free software, licensed under the Apache License, Version 2.0
 
 <%-
   local write = io.write
-  local uci = require "luci.model.uci".cursor()
+  local uci = require("luci.model.uci").cursor()
   local trmiface = uci:get("travelmate", "global", "trm_iface") or "trm_wwan"
 -%>
 
@@ -29,9 +29,8 @@ This is free software, licensed under the Apache License, Version 2.0
   uci:foreach("wireless", "wifi-iface", function(s)
     local iface = s.network or ""
     if iface == trmiface then
-      local section = s['.name']
+      local section = s['.name'] or ""
       local device = s.device or ""
-      local mode = s.mode or ""
       local ssid = s.ssid or ""
       local encryption = s.encryption or ""
       local disabled = s.disabled or ""
index b3907e8..af90c18 100644 (file)
@@ -4,8 +4,8 @@ This is free software, licensed under the Apache License, Version 2.0
 -%>
 
 <%-
-    local sys = require "luci.sys"
-    local utl = require "luci.util"
+    local sys = require("luci.sys")
+    local utl = require("luci.util")
     local dev = luci.http.formvalue("device")
     local iw = luci.sys.wifi.getiwinfo(dev)
 
@@ -28,7 +28,7 @@ This is free software, licensed under the Apache License, Version 2.0
     function percent_wifi_signal(info)
         local qc = info.quality or 0
         local qm = info.quality_max or 0
-        if info.bssid and qc > 0 and qm > 0 then
+        if info.ssid and qc > 0 and qm > 0 then
             return math.floor((100 / qm) * qc)
         else
             return 0
@@ -47,7 +47,7 @@ This is free software, licensed under the Apache License, Version 2.0
                 <th class="cbi-section-table-cell" style="text-align:left"><%:Encryption%></th>
                 <th class="cbi-section-table-cell" style="text-align:left" colspan="2"><%:Signal strength%></th>
             </tr>
-            <% for i, net in ipairs(iw.scanlist or { }) do%>
+            <% for i, net in ipairs(iw.scanlist or { }) do %>
             <tr class="cbi-section-table-row cbi-rowstyle-1">
                 <td class="cbi-value-field" style="text-align:left">
                     <strong><%=net.ssid and utl.pcdata(net.ssid) or "<em>%s</em>" % translate("hidden")%></strong>
index e1e21bc..5191372 100644 (file)
@@ -769,6 +769,9 @@ if hwtype == "mac80211" or hwtype == "prism2" then
                ieee80211r:depends({mode="ap", encryption="psk"})
                ieee80211r:depends({mode="ap", encryption="psk2"})
                ieee80211r:depends({mode="ap", encryption="psk-mixed"})
+               ieee80211r:depends({mode="ap-wds", encryption="psk"})
+               ieee80211r:depends({mode="ap-wds", encryption="psk2"})
+               ieee80211r:depends({mode="ap-wds", encryption="psk-mixed"})
        end
        ieee80211r.rmempty = true