summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2023-03-16 19:23:19 +0100
committerMaria Matejka <mq@ucw.cz>2023-03-16 19:23:33 +0100
commit2b712554d18dfb09274c003315a573f8578270ec (patch)
tree0aca3136c3a0395c9ddb76ec6707aff1ba381911 /proto
parent6b38285f587be9d4b128ae816bc25cb338f7f07c (diff)
BGP: Free bind applies also to outbound connections
Even though the free bind option is primarily meant to alleviate problems with addresses assigned too late, it's also possible to use BIRD with AnyIP configuration, assigning whole ranges to the machine. Therefore free bind allows also to create an outbound connection from specific address even though such address is not assigned.
Diffstat (limited to 'proto')
-rw-r--r--proto/bgp/bgp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index a0e83415..9408715e 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -1109,6 +1109,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 = 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);