diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-06-09 19:12:00 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-06-09 19:12:00 +0200 |
commit | 685b55ee5b0a8a5caea3b33049f71158fc0826cc (patch) | |
tree | 9aeaa4b738f91e70dea25a0ea36c2e5d3b44414f | |
parent | d89701091d6127fd1868a7971577e3c1f8cd008c (diff) | |
download | fastd-685b55ee5b0a8a5caea3b33049f71158fc0826cc.tar fastd-685b55ee5b0a8a5caea3b33049f71158fc0826cc.zip |
Don't allow peer groups in TUN mode
-rw-r--r-- | src/config.c | 6 |
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)) |