diff options
Diffstat (limited to 'conf/conf.c')
-rw-r--r-- | conf/conf.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/conf/conf.c b/conf/conf.c index 0a4e3f8c..9978ef23 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -52,10 +52,11 @@ #include "lib/resource.h" #include "lib/string.h" #include "lib/event.h" -#include "lib/timer.h" +#include "sysdep/unix/timer.h" #include "conf/conf.h" #include "filter/filter.h" + static jmp_buf conf_jmpbuf; struct config *config, *new_config; @@ -85,10 +86,10 @@ int undo_available; /* Undo was not requested from last reconfiguration */ * further use. Returns a pointer to the structure. */ struct config * -config_alloc(const byte *name) +config_alloc(const char *name) { pool *p = rp_new(&root_pool, "Config"); - linpool *l = lp_new(p, 4080); + linpool *l = lp_new_default(p); struct config *c = lp_allocz(l, sizeof(struct config)); /* Duplication of name string in local linear pool */ @@ -96,6 +97,7 @@ config_alloc(const byte *name) char *ndup = lp_allocu(l, nlen); memcpy(ndup, name, nlen); + init_list(&c->tests); c->mrtdump_file = -1; /* Hack, this should be sysdep-specific */ c->pool = p; c->mem = l; @@ -135,15 +137,16 @@ config_parse(struct config *c) sysdep_preconfig(c); protos_preconfig(c); rt_preconfig(c); - roa_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"); -#endif + cf_error("Router ID must be configured manually"); + */ + done = 1; cleanup: @@ -266,7 +269,6 @@ config_do_commit(struct config *c, int type) force_restart |= global_commit(c, old_config); DBG("rt_commit\n"); rt_commit(c, old_config); - roa_commit(c, old_config); DBG("protos_commit\n"); protos_commit(c, old_config, force_restart, type); @@ -504,7 +506,7 @@ order_shutdown(void) * error in the configuration. */ void -cf_error(char *msg, ...) +cf_error(const char *msg, ...) { char buf[1024]; va_list args; |