From ebcf28b9ab43d71179535df61896aa8baa4cdb27 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 10 Jul 2014 18:20:17 +0200 Subject: config: fix basic config checks in TUN mode --- src/config.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/config.c b/src/config.c index 1e6cff7..343823b 100644 --- a/src/config.c +++ b/src/config.c @@ -519,12 +519,14 @@ static void config_check_base(void) { } if (conf.mode == MODE_TUN) { - if (conf.peers->next) - exit_error("config error: in TUN mode exactly one peer must be configured"); - if (conf.peer_group->children) - exit_error("config error: in TUN mode peer groups can't be used"); if (has_peer_group_peer_dirs(conf.peer_group)) exit_error("config error: in TUN mode peer directories can't be used"); + + if (conf.peer_group->children) + exit_error("config error: in TUN mode peer groups can't be used"); + + if (conf.peers && conf.peers->next) + exit_error("config error: in TUN mode exactly one peer must be configured"); } #ifndef USE_PMTU -- cgit v1.2.3