luci-proto-wireguard: enable addressing for tunnel interfaces
authordanrl <[email protected]>
Sat, 14 Jan 2017 16:12:36 +0000 (17:12 +0100)
committerdanrl <[email protected]>
Sat, 14 Jan 2017 16:12:36 +0000 (17:12 +0100)
Enable static addresses on WireGuard tunnel interfaces without requiring
an static address interface.

This removes the requirement to use a static address interface on top of a
WireGuard tunnel interface in the majority of cases. In the past, users have
been confused by the current approach and asked for a simpler way to configure
WireGuard interfaces.

Signed-off-by: Dan Luedtke <[email protected]>
protocols/luci-proto-wireguard/luasrc/model/cbi/admin_network/proto_wireguard.lua

index 774c6db22be69d315cce485e9097bd567ce0d2b6..e585324106cdde5d94d417b26b9d2401acd7a01c 100644 (file)
@@ -1,4 +1,4 @@
--- Copyright 2016 Dan Luedtke <[email protected]>
+-- Copyright 2016-2017 Dan Luedtke <[email protected]>
 -- Licensed to the public under the Apache License 2.0.
 
 
@@ -34,6 +34,16 @@ listen_port.datatype = "port"
 listen_port.placeholder = "51820"
 listen_port.optional = true
 
+addresses = section:taboption(
+  "general",
+  DynamicList,
+  "addresses",
+  translate("IP Addresses"),
+  translate("Recommended. IP addresses of the WireGuard interface.")
+)
+addresses.datatype = "ipaddr"
+addresses.optional = true
+
 
 -- advanced --------------------------------------------------------------------