mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Config: Moved hostname check before any other commit is done
This was sending <none> hostname via UDP while reconfiguring.
This commit is contained in:
parent
cd81b6d7cd
commit
b7400f73a4
16
conf/conf.c
16
conf/conf.c
@ -246,14 +246,6 @@ config_del_obstacle(struct config *c)
|
||||
static int
|
||||
global_commit(struct config *new, struct config *old)
|
||||
{
|
||||
if (!new->hostname)
|
||||
{
|
||||
new->hostname = get_hostname(new->mem);
|
||||
|
||||
if (!new->hostname)
|
||||
log(L_WARN "Cannot determine hostname");
|
||||
}
|
||||
|
||||
if (!old)
|
||||
return 0;
|
||||
|
||||
@ -289,6 +281,14 @@ config_do_commit(struct config *c, int type)
|
||||
old_cftype = type;
|
||||
config = c;
|
||||
|
||||
if (!c->hostname)
|
||||
{
|
||||
c->hostname = get_hostname(c->mem);
|
||||
|
||||
if (!c->hostname)
|
||||
log(L_WARN "Cannot determine hostname");
|
||||
}
|
||||
|
||||
configuring = 1;
|
||||
if (old_config && !config->shutdown)
|
||||
log(L_INFO "Reconfiguring");
|
||||
|
Loading…
Reference in New Issue
Block a user