summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-03-17 12:19:22 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2010-03-17 12:19:22 +0100
commit97e46d28fff1aa27d7d15e113cc3a52ae20934c7 (patch)
tree22f8466422eec5f2759a7263f7359f7b0b11abcc /conf
parent4e3bfd9006ba3033a814a392f9bf4bbca060c8a9 (diff)
downloadbird-97e46d28fff1aa27d7d15e113cc3a52ae20934c7.tar
bird-97e46d28fff1aa27d7d15e113cc3a52ae20934c7.zip
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.
Diffstat (limited to 'conf')
-rw-r--r--conf/conf.c2
1 files changed, 2 insertions, 0 deletions
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");