diff options
author | Linus Nordberg <linus@nordu.net> | 2012-04-11 13:30:30 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2012-04-11 13:30:30 +0200 |
commit | 62eb41a8bf4be835265df15f0183a4682a71ba31 (patch) | |
tree | 16c06fc992aa2dd07e9898d8051f3a4c3ba74bd4 /radsecproxy.c | |
parent | d40144aec7a0bf59a05f236102bf094363caa32e (diff) |
Don't cry and die on a configured server (!) which doesn't resolve (DNS). Just cry some.postpone-resolving
Part of fixing RADSECPROXY-30.
Diffstat (limited to 'radsecproxy.c')
-rw-r--r-- | radsecproxy.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/radsecproxy.c b/radsecproxy.c index 845c208..15ce540 100644 --- a/radsecproxy.c +++ b/radsecproxy.c @@ -360,7 +360,8 @@ int addserver(struct clsrvconf *conf) { conf->servers->sock = -1; if (conf->pdef->addserverextra) - conf->pdef->addserverextra(conf); + if (!conf->pdef->addserverextra(conf)) + return 0; conf->servers->requests = calloc(MAX_REQUESTS, sizeof(struct rqout)); if (!conf->servers->requests) { @@ -2822,10 +2823,9 @@ int compileserverconfig(struct clsrvconf *conf, const char *block) { return 0; } - if (!conf->dynamiclookupcommand && !resolvehostports(conf->hostports, conf->pdef->socktype)) { - debug(DBG_ERR, "%s: resolve failed", __func__); - return 0; - } + if (!conf->dynamiclookupcommand && !resolvehostports(conf->hostports, conf->pdef->socktype)) + debug(DBG_WARN, "%s: resolve failed", __func__); + return 1; } @@ -3295,7 +3295,7 @@ int radsecproxy_main(int argc, char **argv) { if (srvconf->dynamiclookupcommand) continue; if (!addserver(srvconf)) - debugx(1, DBG_ERR, "failed to add server"); + debug(DBG_WARN, "failed to add at least one server"); if (pthread_create(&srvconf->servers->clientth, NULL, clientwr, (void *)(srvconf->servers))) debugx(1, DBG_ERR, "pthread_create failed"); |