bgpd: update source address for bgp neighbor#20330
Conversation
cb4f9c1 to
dbee111
Compare
|
Please add an additional topotest for this problem that is found. I would like to ensure that this stays fixed. |
| /* Send an open message */ | ||
| bgp_open_send(connection); | ||
|
|
||
| if (peer->bfd_config) |
There was a problem hiding this comment.
Do we need the call to bgp_peer_bfd_update_source in bgp_establish() if this is done here? In other words why is it needed here -vs- there.
There was a problem hiding this comment.
What about the case of bgp_connect_success_w_delayopen? Won't that not work?
There was a problem hiding this comment.
repush it for bgp_connect_success_w_delayopen, which is also with this problem.
There was a problem hiding this comment.
update the commit log: the bgp_establish can’t be reached for bfd strict mode without this commit in this case.
The two bgp ipv6 neighbors: A and B, A is with "neighbor B bfd" and B is with "neighbor A bfd strict". Ater bgp neighbor is established, then delete and add the global address (2001::75/64) on A. BFD of A will wrongly use "fe80::x" as source address forever: ``` 2025/12/24 01:50:52 BFD: [SSYGJ-9ZAE0] zclient: add local address 2001::75/64 (VRF 6) 2025/12/24 01:50:52 BGP: [HFMHR-E3VMR] Rx Intf address add VRF vrf1 IF enp1s0 addr 2001::75/64 2025/12/24 01:50:52 BGP: [WJWH8-SHS78] bgp_peer_bfd_update_source: address [2001::75->3001::77] to [fe80::2e53:4aff:fe00:677->3001::77] <- 2025/12/24 01:50:52 BGP: [TT430-NZ800] zclient_bfd_command: multi hop is configured, not sending interface ``` The reason is currently A doesn't update BFD source until bgp neighbor is established. But B uses BFD's strict mode, doesn't response A's OPEN message until BFD is UP, It is dead lock for A and B. So the bgp neighbor between A and B will not be established and BFD is keeping in DOWN status because A is with "fe80::x" as source address. So updating the source address not only when the bgp neighbor is established, but also when the tcp connection is established. Signed-off-by: anlan_cs <anlan_cs@126.com>
dbee111 to
fe068d3
Compare
riw777
left a comment
There was a problem hiding this comment.
looks like @donaldsharp 's comment has been resolved ... looks good
|
@Mergifyio backport stable/10.5 stable/10.4 stable/10.3 |
✅ Backports have been createdDetails
|
bgpd: update source address for bgp neighbor (backport #20330)
bgpd: update source address for bgp neighbor (backport #20330)
bgpd: update source address for bgp neighbor (backport #20330)
The two bgp ipv6 neighbors: A and B, A is with "neighbor B bfd" and B is with "neighbor A bfd strict mode".
Ater bgp neighbor is established, then delete and add the global address (2001::75/64) on A, BFD of A will always use "fe80::x" as source address forever:
The reason is currently A doesn't update BFD source until bgp neighbor is established.
But B uses BFD's strict mode, doesn't response A's OPEN message until BFD is UP, It is dead lock for A and B. So the bgp neighbor between A and B will not be
established and BFD is keeping in DOWN status because A is with "fe80::x" as source address.
So updating the source address not only when the bgp neighbor is established, but also when the tcp connection is established.