From 73710b6b23ac9a4a58f5a4c3b78be87c1bd22124 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 16 Apr 2012 18:47:29 +0200 Subject: Cancel start if no peers are configured --- src/config.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/config.c') diff --git a/src/config.c b/src/config.c index 79cc756..f48adb0 100644 --- a/src/config.c +++ b/src/config.c @@ -549,6 +549,9 @@ void fastd_configure(fastd_context *ctx, fastd_config *conf, int argc, char *con exit_error(ctx, "config error: for tun mode peer directories can't be used"); } + if (!conf->peers && !conf->peer_dirs) + exit_error(ctx, "config error: neither fixed peers nor peer dirs have been configured"); + count_peers(ctx, conf); } -- cgit v1.2.3