Lines 5217-5237
Link Here
|
5217 |
return (result); |
5217 |
return (result); |
5218 |
} |
5218 |
} |
5219 |
|
5219 |
|
5220 |
#ifdef HAVE_GEOIP |
|
|
5221 |
static isc_result_t |
5222 |
load_geoip(ns_server_t *server) { |
5223 |
isc_result_t result; |
5224 |
|
5225 |
result = isc_task_beginexclusive(server->task); |
5226 |
RUNTIME_CHECK(result == ISC_R_SUCCESS); |
5227 |
|
5228 |
geoip_init(); |
5229 |
|
5230 |
isc_task_endexclusive(server->task); |
5231 |
return (result); |
5232 |
} |
5233 |
#endif /* HAVE_GEOIP */ |
5234 |
|
5235 |
static isc_result_t |
5220 |
static isc_result_t |
5236 |
view_loaded(void *arg) { |
5221 |
view_loaded(void *arg) { |
5237 |
isc_result_t result; |
5222 |
isc_result_t result; |
Lines 5260-5270
Link Here
|
5260 |
CHECKFATAL(dns_zonemgr_forcemaint(server->zonemgr), |
5245 |
CHECKFATAL(dns_zonemgr_forcemaint(server->zonemgr), |
5261 |
"forcing zone maintenance"); |
5246 |
"forcing zone maintenance"); |
5262 |
|
5247 |
|
5263 |
#ifdef HAVE_GEOIP |
|
|
5264 |
/* Load GeoIP DBs */ |
5265 |
CHECKFATAL(load_geoip(server), "loading GeoIP"); |
5266 |
#endif /* HAVE_GEOIP */ |
5267 |
|
5268 |
ns_os_started(); |
5248 |
ns_os_started(); |
5269 |
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER, |
5249 |
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER, |
5270 |
ISC_LOG_NOTICE, "running"); |
5250 |
ISC_LOG_NOTICE, "running"); |
Lines 5272-5277
Link Here
|
5272 |
return (ISC_R_SUCCESS); |
5252 |
return (ISC_R_SUCCESS); |
5273 |
} |
5253 |
} |
5274 |
|
5254 |
|
|
|
5255 |
#ifdef HAVE_GEOIP |
5256 |
static isc_result_t |
5257 |
load_geoip(ns_server_t *server) { |
5258 |
isc_result_t result; |
5259 |
|
5260 |
result = isc_task_beginexclusive(server->task); |
5261 |
RUNTIME_CHECK(result == ISC_R_SUCCESS); |
5262 |
|
5263 |
geoip_init(); |
5264 |
|
5265 |
isc_task_endexclusive(server->task); |
5266 |
return (result); |
5267 |
} |
5268 |
#endif /* HAVE_GEOIP */ |
5269 |
|
5275 |
static isc_result_t |
5270 |
static isc_result_t |
5276 |
load_zones(ns_server_t *server) { |
5271 |
load_zones(ns_server_t *server) { |
5277 |
isc_result_t result; |
5272 |
isc_result_t result; |
Lines 5407-5412
Link Here
|
5407 |
isc_hash_init(); |
5402 |
isc_hash_init(); |
5408 |
|
5403 |
|
5409 |
CHECKFATAL(load_zones(server), "loading zones"); |
5404 |
CHECKFATAL(load_zones(server), "loading zones"); |
|
|
5405 |
|
5406 |
#ifdef HAVE_GEOIP |
5407 |
/* Load GeoIP DBs */ |
5408 |
CHECKFATAL(load_geoip(server), "loading GeoIP"); |
5409 |
#endif /* HAVE_GEOIP */ |
5410 |
} |
5410 |
} |
5411 |
|
5411 |
|
5412 |
void |
5412 |
void |
Lines 5851-5859
Link Here
|
5851 |
NS_LOGMODULE_SERVER, ISC_LOG_ERROR, |
5851 |
NS_LOGMODULE_SERVER, ISC_LOG_ERROR, |
5852 |
"reloading zones failed: %s", |
5852 |
"reloading zones failed: %s", |
5853 |
isc_result_totext(result)); |
5853 |
isc_result_totext(result)); |
|
|
5854 |
|
5854 |
#ifdef HAVE_GEOIP |
5855 |
#ifdef HAVE_GEOIP |
5855 |
/* Reload GeoIP DBs */ |
5856 |
/* Reload GeoIP DBs */ |
5856 |
load_geoip(server); |
5857 |
result = load_geoip(server); |
|
|
5858 |
if (result == ISC_R_SUCCESS) |
5859 |
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, |
5860 |
NS_LOGMODULE_SERVER, ISC_LOG_INFO, |
5861 |
"reloading GeoIP succeeded"); |
5862 |
else |
5863 |
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, |
5864 |
NS_LOGMODULE_SERVER, ISC_LOG_ERROR, |
5865 |
"reloading GeoIP failed: %s", |
5866 |
isc_result_totext(result)); |
5857 |
#endif /* HAVE_GEOIP */ |
5867 |
#endif /* HAVE_GEOIP */ |
5858 |
|
5868 |
|
5859 |
cleanup: |
5869 |
cleanup: |