diff options
author | danrl <mail@danrl.com> | 2017-02-24 15:03:11 +0100 |
---|---|---|
committer | danrl <mail@danrl.com> | 2017-02-27 20:48:46 +0100 |
commit | cd8333cf0b90c6498366c993f8135dbd29cd6000 (patch) | |
tree | 229557137a0c6ad13306fddb54f8db1da30f3db3 /protocols/luci-proto-wireguard/luasrc | |
parent | 09353ff64059b82f5ce2fab330a036e448b4a075 (diff) |
luci-proto-wireguard: add support for fwmark option
Adds support for the fwmark option.
FwMark is a 32-bit fwmark for outgoing packets.
If set to 0 or "off", this option is disabled.
Signed-off-by: Dan Luedtke <mail@danrl.com>
Diffstat (limited to 'protocols/luci-proto-wireguard/luasrc')
-rw-r--r-- | protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua | 20 |
1 files changed, 16 insertions, 4 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 d950081197..11ef10b5a7 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 @@ -19,7 +19,7 @@ private_key = section:taboption( translate("Required. Base64-encoded private key for this interface.") ) private_key.password = true -private_key.datatype = "and(base64,rangelength(44, 44))" +private_key.datatype = "and(base64,rangelength(44,44))" private_key.optional = false @@ -81,10 +81,22 @@ preshared_key = section:taboption( "cryptography for post-quantum resistance.") ) preshared_key.password = true -preshared_key.datatype = "and(base64,rangelength(44, 44))" +preshared_key.datatype = "and(base64,rangelength(44,44))" preshared_key.optional = true +fwmark = section:taboption( + "advanced", + Value, + "fwmark", + translate("Firewall Mark"), + translate("Optional. 32-bit mark for outgoing encrypted packets. " .. + "Enter value in hex, starting with <code>0x</code>.") +) +fwmark.datatype = "hex(4)" +fwmark.optional = true + + -- peers ----------------------------------------------------------------------- peers = map:section( @@ -105,7 +117,7 @@ public_key = peers:option( translate("Public Key"), translate("Required. Base64-encoded public key of peer.") ) -public_key.datatype = "and(base64,rangelength(44, 44))" +public_key.datatype = "and(base64,rangelength(44,44))" public_key.optional = false @@ -155,5 +167,5 @@ persistent_keepalive = peers:option( translate("Optional. Seconds between keep alive messages. " .. "Default is 0 (disabled). Recommended value if " .. "this device is behind a NAT is 25.")) -persistent_keepalive.datatype = "range(0, 65535)" +persistent_keepalive.datatype = "range(0,65535)" persistent_keepalive.placeholder = "0" |