From 4ef0950603ffbd515d97359015585b4a7512bc75 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 1 Apr 2011 13:54:39 +0200 Subject: Fixes a problem with BGP protocols and implicit router IDs. --- proto/bgp/bgp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'proto/bgp/bgp.c') 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; -- cgit v1.2.3