wg-installer: check if a key is already inserted
authorNick Hainke <vincent@systemli.org>
Tue, 18 Jan 2022 17:31:46 +0000 (18:31 +0100)
committerNick Hainke <vincent@systemli.org>
Thu, 20 Jan 2022 12:57:46 +0000 (13:57 +0100)
commita430932a7d3d017c536c218803aae59dd77df1de
treef95f53f9cec20773f532818a7cbf78f8a9c17b1a
parent0aaa90629c8e72447ca44cde83df9d126811eb5f
wg-installer: check if a key is already inserted

Check if a peer is already existing with a given public key. Introduce a
response code for signaling why the server rejected the request.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit da48bc3792705b12fc104459ed9f5f1b73544d17)
net/wg-installer/wg-client/lib/rpcd_ubus.sh
net/wg-installer/wg-server/lib/wg_functions.sh