summaryrefslogtreecommitdiff
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2014-10-02 11:33:55 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2014-10-02 12:52:50 +0200
commitdcde7ae597ccb7d81648b9ecab7c0f61c88e60f2 (patch)
tree673dd152c3e3758ae1a41e89324f8b3334e21bf7 /proto/bgp/bgp.c
parent252c7e4d0b7b45c89f69b3c4763b0c013aa5830d (diff)
Allows to configure different remote port for BGP sessions.
Thanks to João Taveira Araújo for the original patch.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c4
1 files changed, 2 insertions, 2 deletions
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);