Fix reloading Subnets when StrictSubnets is set.

This commit is contained in:
Guus Sliepen 2010-04-11 04:35:16 +02:00
parent 9f53ab209d
commit 32f5524c4b
2 changed files with 7 additions and 7 deletions

View file

@ -508,8 +508,9 @@ int main_loop(void) {
send_del_subnet(broadcast, subnet); send_del_subnet(broadcast, subnet);
subnet_del(subnet->owner, subnet); subnet_del(subnet->owner, subnet);
} else if(subnet->expires == -1) { } else if(subnet->expires == -1) {
send_add_subnet(broadcast, subnet);
subnet->expires = 0; subnet->expires = 0;
} else {
send_add_subnet(broadcast, subnet);
} }
} }
} }

View file

@ -228,9 +228,6 @@ void load_all_subnets(void) {
continue; continue;
n = lookup_node(ent->d_name); n = lookup_node(ent->d_name);
if(n)
continue;
#ifdef _DIRENT_HAVE_D_TYPE #ifdef _DIRENT_HAVE_D_TYPE
//if(ent->d_type != DT_REG) //if(ent->d_type != DT_REG)
// continue; // continue;
@ -243,9 +240,11 @@ void load_all_subnets(void) {
if(!result) if(!result)
continue; continue;
n = new_node(); if(!n) {
n->name = xstrdup(ent->d_name); n = new_node();
node_add(n); n->name = xstrdup(ent->d_name);
node_add(n);
}
for(cfg = lookup_config(config_tree, "Subnet"); cfg; cfg = lookup_config_next(config_tree, cfg)) { for(cfg = lookup_config(config_tree, "Subnet"); cfg; cfg = lookup_config_next(config_tree, cfg)) {
if(!get_config_subnet(cfg, &s)) if(!get_config_subnet(cfg, &s))