mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Implements interface masks for choosing router id.
Router ID could be automatically determined based of subset of ifaces/addresses specified by 'router id from' option. The patch also does some minor changes related to router ID reconfiguration. Thanks to Alexander V. Chernikov for most of the work.
This commit is contained in:
16
conf/conf.c
16
conf/conf.c
@@ -200,9 +200,19 @@ global_commit(struct config *new, struct config *old)
|
||||
log(L_WARN "Reconfiguration of BGP listening socket not implemented, please restart BIRD.");
|
||||
|
||||
if (!new->router_id)
|
||||
new->router_id = old->router_id;
|
||||
if (new->router_id != old->router_id)
|
||||
return 1;
|
||||
{
|
||||
new->router_id = old->router_id;
|
||||
|
||||
if (new->router_id_from)
|
||||
{
|
||||
u32 id = if_choose_router_id(new->router_id_from, old->router_id);
|
||||
if (!id)
|
||||
log(L_WARN "Cannot determine router ID, using old one");
|
||||
else
|
||||
new->router_id = id;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user