From 97e46d28fff1aa27d7d15e113cc3a52ae20934c7 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 17 Mar 2010 12:19:22 +0100 Subject: Adds check for no protocol and some minor CLI fixes. - Adds check to deny config file with no specified protocol to prevent loading of empty config file. - Moves CLI init before config parse to receive immediate error message when cannot open control socket. - Fixes socket name path check and other error handling in CLI init. --- conf/conf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'conf/conf.c') diff --git a/conf/conf.c b/conf/conf.c index 58eb10a..604a412 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -114,6 +114,8 @@ config_parse(struct config *c) rt_preconfig(c); cf_parse(); protos_postconfig(c); + if (EMPTY_LIST(c->protos)) + cf_error("No protocol is specified in the config file"); #ifdef IPV6 if (!c->router_id) cf_error("Router ID must be configured manually on IPv6 routers"); -- cgit v1.2.3