Give up loading invalid configurations.
Bip does not know how to deal with a network with no server. Simply prevent loading such bad configs. Fixes: https://projects.duckcorp.org/issues/611
This commit is contained in:
parent
09053fc5f0
commit
16f2be6ac2
@ -345,6 +345,14 @@ static int add_network(bip_t *bip, list_t *data)
|
|||||||
n->ciphers = conf_server_default_ciphers;
|
n->ciphers = conf_server_default_ciphers;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (n->serverc == 0) {
|
||||||
|
hash_remove_if_exists(&bip->networks, name);
|
||||||
|
free(n->name);
|
||||||
|
free(n);
|
||||||
|
conf_die(bip, "No sever in network: %s", n->name);
|
||||||
|
n = NULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user