diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-05 13:21:44 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-05 13:21:44 +0200 |
commit | 347606ed319744c5b09161ce736a11f5443d91e2 (patch) | |
tree | b13ab62bf465a1ccb013c4b077666b1597ad1296 /interface-definitions | |
parent | 66103774a9298452dc323f6eb3908bb657a01b5e (diff) | |
download | vyos-1x-347606ed319744c5b09161ce736a11f5443d91e2.tar.gz vyos-1x-347606ed319744c5b09161ce736a11f5443d91e2.zip |
wireguard: T2206: split endpoint node into address and port
WireGuard has been the only subsystem combining a remote ip address and a
remote port number into a single node. This is bad as there is no possiblity
for the XML based input validation for IP address and port numbers.
That's the reason the peer endpoint node goets migrated into a peer address
and a peer port node utilizing the embedded syntax node checking for IP
addresses and port ranges.
Diffstat (limited to 'interface-definitions')
-rw-r--r-- | interface-definitions/interfaces-wireguard.xml.in | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/interface-definitions/interfaces-wireguard.xml.in b/interface-definitions/interfaces-wireguard.xml.in index d461156b3..87b38962d 100644 --- a/interface-definitions/interfaces-wireguard.xml.in +++ b/interface-definitions/interfaces-wireguard.xml.in @@ -97,10 +97,28 @@ <multi/> </properties> </leafNode> - <!-- eventually check format IP:port --> - <leafNode name="endpoint"> + <leafNode name="address"> <properties> - <help>Remote endpoint (IP:port)</help> + <help>IP address of tunnel remote end</help> + <valueHelp> + <format>ipv4</format> + <description>IP address to listen for incoming connections</description> + </valueHelp> + <constraint> + <validator name="ipv4-address"/> + </constraint> + </properties> + </leafNode> + <leafNode name="port"> + <properties> + <help>Port number on tunnel remote end</help> + <valueHelp> + <format>1024-65535</format> + <description>Numeric IP port</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1024-65535"/> + </constraint> </properties> </leafNode> <leafNode name="persistent-keepalive"> |