Skip to content

Conversation

@pguibert6WIND
Copy link
Member

2 Fixes related to how BGP open messages are forged for LOC-RIB notification messages.
Actually all fields are set to 0, but this is not what is usually expected.

Use the settings of the current BGP instance for AS value and router-id.

@pguibert6WIND
Copy link
Member Author

ci:rerun

bgpd/bgp_bmp.c Outdated
local_as = peer->local_as;

s = bgp_open_make(peer, send_holdtime, local_as, &peer->local_id);
/* for loc-rib, AS used is always the one from the current BGP instance */
Copy link
Member

Choose a reason for hiding this comment

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

Why are we not fixing the local_as value in the peer structure? We've completely lost the ability to pass this value now? Why?

Copy link
Member Author

Choose a reason for hiding this comment

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

OK to keep the ability to pass the value.
I changed the logic, and to take the new AS, I will update bgp->peer_self->[AS] value

bgpd/bgp_bmp.c Outdated

/* for loc-rib, AS used is always the one from the current BGP instance */
s = bgp_open_make(peer, send_holdtime, bgp->as, &peer->local_id);
s = bgp_open_make(peer, send_holdtime, bgp->as, &bgp->router_id);
Copy link
Member

Choose a reason for hiding this comment

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

Again we should use the local_id and have it set appropriately. Why is this not being updated instead?

Copy link
Member

Choose a reason for hiding this comment

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

there are other places that use the peer->local_id. This change implies that those are now wrong too when they are being used. Let's fix that?

Copy link
Member Author

Choose a reason for hiding this comment

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

I keep the usage of peer->local_id, and I will maintain bgp->peer_self->router_id.

@pguibert6WIND pguibert6WIND marked this pull request as draft June 22, 2025 20:29
@pguibert6WIND pguibert6WIND force-pushed the bmp_locrib_bgp_open_message branch 2 times, most recently from 48580e1 to 7ab7533 Compare June 23, 2025 09:46
@github-actions github-actions bot added size/M and removed size/S labels Jun 23, 2025
The AS from BGP open messages from loc-rib notification messages is set to 0.
The peer_self->local_as value should reuse the value of the BGP instance.

Fixes: 035304c ("bgpd: bmp loc-rib peer up/down for vrfs")

Signed-off-by: Philippe Guibert <[email protected]>
@pguibert6WIND pguibert6WIND force-pushed the bmp_locrib_bgp_open_message branch from 7ab7533 to a0f041d Compare June 23, 2025 09:52
The router_id of bgp open messages is set to 0.0.0.0, whereas it should
be set to the value of the current bgp instance. Update the peer_self
router-id value.

Fixes: 2a14304 ("bgpd: fix loc-rib open message should use router-id")

Signed-off-by: Philippe Guibert <[email protected]>
Add the bgp open fields in the BMP messages.
Add a test that checks the AS and BGP ID value of the bgp open message
for loc-rib message, when the router-id changes.

Signed-off-by: Philippe Guibert <[email protected]>
@pguibert6WIND pguibert6WIND force-pushed the bmp_locrib_bgp_open_message branch from a0f041d to 613ffb8 Compare June 23, 2025 13:13
@pguibert6WIND
Copy link
Member Author

ci:rerun

@pguibert6WIND pguibert6WIND marked this pull request as ready for review June 24, 2025 20:00
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 good

@riw777 riw777 merged commit 81cbc9a into FRRouting:master Jul 1, 2025
14 checks passed
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.

3 participants