summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-04-01 13:54:39 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-04-01 13:55:52 +0200
commit4ef0950603ffbd515d97359015585b4a7512bc75 (patch)
treeb896d63763c6657b295713e1c064ba3ed276f3d8 /proto
parentd93a43a57d37b7cc5506a823a081d21f515c3820 (diff)
downloadbird-4ef0950603ffbd515d97359015585b4a7512bc75.tar
bird-4ef0950603ffbd515d97359015585b4a7512bc75.zip
Fixes a problem with BGP protocols and implicit router IDs.
Diffstat (limited to 'proto')
-rw-r--r--proto/bgp/bgp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 327292a..9c069b4 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -798,6 +798,10 @@ bgp_start(struct proto *P)
p->startup_timer->hook = bgp_startup_timeout;
p->startup_timer->data = p;
+ p->local_id = proto_get_router_id(P->cf);
+ if (p->rr_client)
+ p->rr_cluster_id = p->cf->rr_cluster_id ? p->cf->rr_cluster_id : p->local_id;
+
p->remote_id = 0;
p->source_addr = p->cf->source_addr;
@@ -874,11 +878,8 @@ bgp_init(struct proto_config *C)
p->local_as = c->local_as;
p->remote_as = c->remote_as;
p->is_internal = (c->local_as == c->remote_as);
- p->local_id = proto_get_router_id(C);
p->rs_client = c->rs_client;
p->rr_client = c->rr_client;
- if (p->rr_client)
- p->rr_cluster_id = c->rr_cluster_id ? c->rr_cluster_id : p->local_id;
p->igp_table = get_igp_table(c);
return P;