summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-06-09 19:12:00 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-06-09 19:12:00 +0200
commit685b55ee5b0a8a5caea3b33049f71158fc0826cc (patch)
tree9aeaa4b738f91e70dea25a0ea36c2e5d3b44414f
parentd89701091d6127fd1868a7971577e3c1f8cd008c (diff)
downloadfastd-685b55ee5b0a8a5caea3b33049f71158fc0826cc.tar
fastd-685b55ee5b0a8a5caea3b33049f71158fc0826cc.zip
Don't allow peer groups in TUN mode
-rw-r--r--src/config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c
index c9071e1..18358a2 100644
--- a/src/config.c
+++ b/src/config.c
@@ -946,9 +946,11 @@ void fastd_configure(fastd_context_t *ctx, fastd_config_t *conf, int argc, char
if (conf->mode == MODE_TUN) {
if (!conf->peers || conf->peers->next)
- exit_error(ctx, "config error: for tun mode exactly one peer must be configured");
+ exit_error(ctx, "config error: in TUN mode exactly one peer must be configured");
+ if (conf->peer_group->children)
+ exit_error(ctx, "config error: in TUN mode peer groups can't be used");
if (has_peer_group_peer_dirs(conf->peer_group))
- exit_error(ctx, "config error: for tun mode peer directories can't be used");
+ exit_error(ctx, "config error: in TUN mode peer directories can't be used");
}
if (!conf->peers && !has_peer_group_peer_dirs(conf->peer_group))