4 bool get_config_subnet(const config_t *cfg, subnet_t **result) {
11 if(!str2net(&subnet, cfg->value)) {
12 logger(DEBUG_ALWAYS, LOG_ERR, "Subnet expected for configuration variable %s in %s line %d",
13 cfg->variable, cfg->file, cfg->line);
17 if(subnetcheck(subnet)) {
18 *(*result = new_subnet()) = subnet;
22 logger(DEBUG_ALWAYS, LOG_ERR, "Network address and prefix length do not match for configuration variable %s in %s line %d",
23 cfg->variable, cfg->file, cfg->line);