summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 03:30:01 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-24 03:31:12 +0200
commit4c0623a080c77ed54fa9fec47c2ab982385cb9a9 (patch)
tree4f21cab2b343a39efa319b22d2c14d536c41f171
parentd42e9d9b1af0edb88dd00a64498f0a9ff98844b3 (diff)
downloadfastd-4c0623a080c77ed54fa9fec47c2ab982385cb9a9.tar
fastd-4c0623a080c77ed54fa9fec47c2ab982385cb9a9.zip
Exit if invalid peers are configured on the command line
-rw-r--r--src/options.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index 1e7764d..8593da2 100644
--- a/src/options.c
+++ b/src/options.c
@@ -122,7 +122,8 @@ static void option_config_peer(const char *arg) {
if(!fastd_config_read(arg, conf.peer_group, peer, 0))
exit(1);
- fastd_peer_add(peer);
+ if (!fastd_peer_add(peer))
+ exit_error("invalid peer definition");
}
/** Handles the --config-peer-dir option */