summaryrefslogtreecommitdiffhomepage
path: root/protocols
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-05-09 16:45:42 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-05-09 16:51:40 +0200
commitb9b64aae968f2d9fbb361ef96ee7e3a58437314f (patch)
treee20482b98bccd3bfd2b46bc2f69f306ab9e2962a /protocols
parent757cdbb5f76cf1b57ecb63d316a1aab35423cb7e (diff)
wireguard: preshared-key is now an attribute of the peer
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'protocols')
-rw-r--r--protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua28
1 files changed, 13 insertions, 15 deletions
diff --git a/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua b/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua
index 11ef10b5a..bb7674b31 100644
--- a/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua
+++ b/protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua
@@ -70,21 +70,6 @@ mtu.datatype = "range(1280,1420)"
mtu.placeholder = "1420"
mtu.optional = true
-
-preshared_key = section:taboption(
- "advanced",
- Value,
- "preshared_key",
- translate("Preshared Key"),
- translate("Optional. Base64-encoded preshared key. " ..
- "Adds in an additional layer of symmetric-key " ..
- "cryptography for post-quantum resistance.")
-)
-preshared_key.password = true
-preshared_key.datatype = "and(base64,rangelength(44,44))"
-preshared_key.optional = true
-
-
fwmark = section:taboption(
"advanced",
Value,
@@ -121,6 +106,19 @@ public_key.datatype = "and(base64,rangelength(44,44))"
public_key.optional = false
+preshared_key = peers:option(
+ Value,
+ "preshared_key",
+ translate("Preshared Key"),
+ translate("Optional. Base64-encoded preshared key. " ..
+ "Adds in an additional layer of symmetric-key " ..
+ "cryptography for post-quantum resistance.")
+)
+preshared_key.password = true
+preshared_key.datatype = "and(base64,rangelength(44,44))"
+preshared_key.optional = true
+
+
allowed_ips = peers:option(
DynamicList,
"allowed_ips",