Skip to content

Conversation

@anlancs
Copy link
Contributor

@anlancs anlancs commented Dec 26, 2025

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:

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.

@donaldsharp
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the case of bgp_connect_success_w_delayopen? Won't that not work?

Copy link
Contributor Author

@anlancs anlancs Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repush it for bgp_connect_success_w_delayopen, which is also with this problem.

Copy link
Contributor Author

@anlancs anlancs Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the commit log: the bgp_establish can’t be reached for bfd strict mode without this commit in this case.

@anlancs anlancs closed this Dec 28, 2025
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>
@anlancs anlancs reopened this Dec 30, 2025
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like @donaldsharp 's comment has been resolved ... looks good

@ton31337
Copy link
Member

ton31337 commented Jan 4, 2026

@Mergifyio backport stable/10.5 stable/10.4 stable/10.3

@mergify
Copy link

mergify bot commented Jan 4, 2026

backport stable/10.5 stable/10.4 stable/10.3

✅ Backports have been created

Details

@riw777 riw777 merged commit d8a432c into FRRouting:master Jan 6, 2026
18 checks passed
donaldsharp added a commit that referenced this pull request Jan 6, 2026
bgpd: update source address for bgp neighbor (backport #20330)
Jafaral added a commit that referenced this pull request Jan 6, 2026
bgpd: update source address for bgp neighbor (backport #20330)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants