]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
wg: allow creating device with no peers
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 30 May 2017 03:14:53 +0000 (05:14 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 31 May 2017 03:35:34 +0000 (05:35 +0200)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/config.c

index f57fa8278072724b0dbd863d3f3f1378c2d24c58..5bb985f7d362ce3304d012c2a4d7fc8b3bdaf2c9 100644 (file)
@@ -397,10 +397,6 @@ bool config_read_finish(struct config_ctx *ctx)
 {
        size_t i;
        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)) {
                fprintf(stderr, "No private key configured\n");
                goto err;