From dcde7ae597ccb7d81648b9ecab7c0f61c88e60f2 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Thu, 2 Oct 2014 11:33:55 +0200 Subject: Allows to configure different remote port for BGP sessions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks to João Taveira Araújo for the original patch. --- proto/bgp/bgp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'proto/bgp/bgp.c') diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index b6239971..e2339112 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -680,8 +680,8 @@ bgp_connect(struct bgp_proto *p) /* Enter Connect state and start establishing c s->type = SK_TCP_ACTIVE; s->saddr = p->source_addr; s->daddr = p->cf->remote_ip; + s->dport = p->cf->remote_port; s->iface = p->neigh ? p->neigh->iface : NULL; - s->dport = BGP_PORT; s->ttl = p->cf->ttl_security ? 255 : hops; s->rbsize = BGP_RX_BUFFER_SIZE; s->tbsize = BGP_TX_BUFFER_SIZE; @@ -1016,9 +1016,9 @@ bgp_start(struct proto *P) lock = p->lock = olock_new(P->pool); lock->addr = p->cf->remote_ip; + lock->port = p->cf->remote_port; lock->iface = p->cf->iface; lock->type = OBJLOCK_TCP; - lock->port = BGP_PORT; lock->hook = bgp_start_locked; lock->data = p; olock_acquire(lock); -- cgit v1.2.3