summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-04-16 18:47:29 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-04-16 18:47:29 +0200
commit73710b6b23ac9a4a58f5a4c3b78be87c1bd22124 (patch)
tree4d954b1c68f25a86cb4e3b7bc5f2b4f0e1e5f29a
parent9a1195a6f74d89b036c2285f91c918a4bdfa1880 (diff)
downloadfastd-73710b6b23ac9a4a58f5a4c3b78be87c1bd22124.tar
fastd-73710b6b23ac9a4a58f5a4c3b78be87c1bd22124.zip
Cancel start if no peers are configured
-rw-r--r--src/config.c3
1 files changed, 3 insertions, 0 deletions
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);
}