From e16b0aef31adf7000c22430adc3ceb9fc969ae14 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Wed, 2 Jan 2019 15:57:14 +0100 Subject: BGP: Postpone setting link_addr It may happen that the LLv6 address for given iface is not defined during BGP start, so we postpone the check to the the session establishment. --- proto/bgp/bgp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'proto') diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index fb6c9881..ceeec727 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -505,6 +505,10 @@ bgp_conn_enter_established_state(struct bgp_conn *conn) if (ipa_zero(p->source_addr)) p->source_addr = conn->sk->saddr; + /* In case of LLv6 is not valid during BGP start */ + if (ipa_zero(p->link_addr) && p->neigh && p->neigh->iface && p->neigh->iface->llv6) + p->link_addr = p->neigh->iface->llv6->ip; + conn->sk->fast_rx = 0; p->conn = conn; -- cgit v1.2.3