0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-03 07:31:54 +00:00

BGP: set free bind also for connect sockets if configured

This commit is contained in:
Maria Matejka 2023-03-06 20:00:01 +01:00
parent 1b1ed1fc78
commit 4a69a64745

View File

@ -365,8 +365,7 @@ bgp_startup(struct bgp_proto *p)
if (p->postponed_sk) if (p->postponed_sk)
{ {
/* Apply postponed incoming connection */ /* Apply postponed incoming connection */
sk_unmain(p->postponed_sk); sk_reloop(p->postponed_sk, p->p.loop);
sk_start(p->postponed_sk);
bgp_setup_conn(p, &p->incoming_conn); bgp_setup_conn(p, &p->incoming_conn);
bgp_setup_sk(&p->incoming_conn, p->postponed_sk); 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->tos = IP_PREC_INTERNET_CONTROL;
s->password = p->cf->password; s->password = p->cf->password;
s->tx_hook = bgp_connected; 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", 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->daddr, ipa_is_link_local(s->daddr) ? p->cf->iface : NULL,
s->saddr, ipa_is_link_local(s->saddr) ? s->iface : NULL); s->saddr, ipa_is_link_local(s->saddr) ? s->iface : NULL);