summaryrefslogtreecommitdiff
path: root/proto/bgp
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-03-06 20:00:01 +0100
committerMaria Matejka <mq@ucw.cz>2023-04-04 17:00:59 +0200
commit4a69a64745e44066abfa4f6a17a7bb7a2fde9834 (patch)
tree665dc8d3fb053a20853fc3d9b74e7091b4e64104 /proto/bgp
parent1b1ed1fc78740f0a2c76e7288be0fc85877484da (diff)
BGP: set free bind also for connect sockets if configured
Diffstat (limited to 'proto/bgp')
-rw-r--r--proto/bgp/bgp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 328f6cf4..41df59bb 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -365,8 +365,7 @@ bgp_startup(struct bgp_proto *p)
if (p->postponed_sk)
{
/* Apply postponed incoming connection */
- sk_unmain(p->postponed_sk);
- sk_start(p->postponed_sk);
+ sk_reloop(p->postponed_sk, p->p.loop);
bgp_setup_conn(p, &p->incoming_conn);
bgp_setup_sk(&p->incoming_conn, p->postponed_sk);
@@ -1243,7 +1242,7 @@ bgp_connect(struct bgp_proto *p) /* Enter Connect state and start establishing c
s->tos = IP_PREC_INTERNET_CONTROL;
s->password = p->cf->password;
s->tx_hook = bgp_connected;
- s->flags = SKF_THREAD;
+ s->flags = p->cf->free_bind ? SKF_FREEBIND : 0;
BGP_TRACE(D_EVENTS, "Connecting to %I%J from local address %I%J",
s->daddr, ipa_is_link_local(s->daddr) ? p->cf->iface : NULL,
s->saddr, ipa_is_link_local(s->saddr) ? s->iface : NULL);