diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-05-12 00:09:34 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-05-12 00:09:34 +0200 |
commit | f82ebae56cd268645f16fb3fca2b5342d77f44a1 (patch) | |
tree | 01844ceb4bf6c98c48b0b2d6a94c9b991545cb8a | |
parent | ec6370ade8d4e8039325b4a578dec6a7e1bca696 (diff) | |
download | fastd-f82ebae56cd268645f16fb3fca2b5342d77f44a1.tar fastd-f82ebae56cd268645f16fb3fca2b5342d77f44a1.zip |
config: allow on-verify configuration without any other peers
-rw-r--r-- | src/config.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 4b9aeec..33621c7 100644 --- a/src/config.c +++ b/src/config.c @@ -568,7 +568,7 @@ static void config_check_base(void) { void fastd_config_check(void) { config_check_base(); - if (!VECTOR_LEN(ctx.peers) && !has_peer_group_peer_dirs(conf.peer_group)) + if (!VECTOR_LEN(ctx.peers) && !has_peer_group_peer_dirs(conf.peer_group) && !fastd_allow_verify()) exit_error("config error: neither fixed peers nor peer dirs have been configured"); if (!conf.peer_group->methods) { @@ -588,6 +588,9 @@ bool fastd_config_single_iface(void) { if (has_peer_group_peer_dirs(conf.peer_group)) return false; + if (fastd_allow_verify()) + return false; + return (VECTOR_LEN(ctx.peers) == 1); } |