diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-16 18:47:29 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-04-16 18:47:29 +0200 |
commit | 73710b6b23ac9a4a58f5a4c3b78be87c1bd22124 (patch) | |
tree | 4d954b1c68f25a86cb4e3b7bc5f2b4f0e1e5f29a /src | |
parent | 9a1195a6f74d89b036c2285f91c918a4bdfa1880 (diff) | |
download | fastd-73710b6b23ac9a4a58f5a4c3b78be87c1bd22124.tar fastd-73710b6b23ac9a4a58f5a4c3b78be87c1bd22124.zip |
Cancel start if no peers are configured
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 3 |
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); } |