@@ -962,7 +962,10 @@ main (int argc, char *argv[])
exit(RTVL_FAIL);
}
- check_alias_settings(conf);
+ if (check_alias_settings(conf)) {
+ fprintf(stderr, "fatal configuration error, aborting");
+ exit(RTVL_FAIL);
+ }
if (optind < argc) {
dev = MALLOC(FILE_NAME_SIZE);
@@ -2820,7 +2820,9 @@ reconfigure (struct vectors * vecs)
reset_checker_classes();
if (bindings_read_only)
conf->bindings_read_only = bindings_read_only;
- check_alias_settings(conf);
+
+ if (check_alias_settings(conf))
+ return 1;
uxsock_timeout = conf->uxsock_timeout;
@@ -3336,15 +3338,22 @@ child (__attribute__((unused)) void *param)
if (state == DAEMON_SHUTDOWN)
break;
if (state == DAEMON_CONFIGURE) {
+ int rc = 0;
+
pthread_cleanup_push(cleanup_lock, &vecs->lock);
lock(&vecs->lock);
pthread_testcancel();
if (!need_to_delay_reconfig(vecs))
- reconfigure(vecs);
+ rc = reconfigure(vecs);
else
enable_delayed_reconfig();
lock_cleanup_pop(vecs->lock);
- post_config_state(DAEMON_IDLE);
+ if (!rc)
+ post_config_state(DAEMON_IDLE);
+ else {
+ condlog(0, "fatal error applying configuration - aborting");
+ exit_daemon();
+ }
}
}