wg: allow creating device with no peers
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
8d8ea7a4fb
commit
32afe0e220
1 changed files with 0 additions and 4 deletions
|
@ -397,10 +397,6 @@ bool config_read_finish(struct config_ctx *ctx)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
struct wgpeer *peer;
|
struct wgpeer *peer;
|
||||||
if (ctx->buf.dev->flags & WGDEVICE_REPLACE_PEERS && !ctx->buf.dev->num_peers) {
|
|
||||||
fprintf(stderr, "No peers configured\n");
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
if (ctx->buf.dev->flags & WGDEVICE_REPLACE_PEERS && !key_is_valid(ctx->buf.dev->private_key)) {
|
if (ctx->buf.dev->flags & WGDEVICE_REPLACE_PEERS && !key_is_valid(ctx->buf.dev->private_key)) {
|
||||||
fprintf(stderr, "No private key configured\n");
|
fprintf(stderr, "No private key configured\n");
|
||||||
goto err;
|
goto err;
|
||||||
|
|
Loading…
Reference in a new issue