diff options
author | hagbard <vyosdev@derith.de> | 2018-09-01 09:16:25 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2018-09-01 09:16:25 -0700 |
commit | a6831b208ca431c323904949285f0205f342d4fb (patch) | |
tree | 82ff5854bb6be14e12912929109f363f0ec5aefa /interface-definitions/wireguard.xml | |
parent | ef8723f40ab28689c7aadb32c261f43a86f50082 (diff) | |
download | vyos-1x-a6831b208ca431c323904949285f0205f342d4fb.tar.gz vyos-1x-a6831b208ca431c323904949285f0205f342d4fb.zip |
T427,T793 wireguard support
- regex added to check endpoint as pattern IP:port
- T793: preparation for the use preshared key
Diffstat (limited to 'interface-definitions/wireguard.xml')
-rw-r--r-- | interface-definitions/wireguard.xml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/interface-definitions/wireguard.xml b/interface-definitions/wireguard.xml index cf25124fa..e325c5df9 100644 --- a/interface-definitions/wireguard.xml +++ b/interface-definitions/wireguard.xml @@ -88,6 +88,15 @@ <constraintErrorMessage>Key is not valid 44-character (32-bytes) base64</constraintErrorMessage> </properties> </leafNode> + <leafNode name="preshared-key"> + <properties> + <help>base64 encoded preshared key</help> + <constraint> + <regex>^[0-9a-zA-Z\+/]{43}=$</regex> + </constraint> + <constraintErrorMessage>Key is not valid 44-character (32-bytes) base64</constraintErrorMessage> + </properties> + </leafNode> <leafNode name="allowed-ips"> <properties> <help>IP addresses allowed to traverse the peer</help> @@ -98,6 +107,10 @@ <leafNode name="endpoint"> <properties> <help>Remote endpoint</help> + <constraint> + <regex>:[1-6][0-9]{3,4}$</regex> + </constraint> + <constraintErrorMessage>invalid endpoint setting (IP:port)</constraintErrorMessage> </properties> </leafNode> <leafNode name="persistent-keepalive"> |