summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/conf.c16
-rw-r--r--conf/conf.h1
2 files changed, 14 insertions, 3 deletions
diff --git a/conf/conf.c b/conf/conf.c
index 6dfa3691..14225d3b 100644
--- a/conf/conf.c
+++ b/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;
}
diff --git a/conf/conf.h b/conf/conf.h
index 19300f54..683374e0 100644
--- a/conf/conf.h
+++ b/conf/conf.h
@@ -26,6 +26,7 @@ struct config {
int mrtdump_file; /* Configured MRTDump file (sysdep, fd in unix) */
char *syslog_name; /* Name used for syslog (NULL -> no syslog) */
struct rtable_config *master_rtc; /* Configuration of master routing table */
+ struct iface_patt *router_id_from; /* Configured list of router ID iface patterns */
u32 router_id; /* Our Router ID */
ip_addr listen_bgp_addr; /* Listening BGP socket should use this address */