Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bmp bgp open router id and as val #18037

Merged

Conversation

pguibert6WIND
Copy link
Member

Change the value of router-id and AS value for BGP OPEN TX message made for LOC-RIB peerup/down messages.

@pguibert6WIND pguibert6WIND force-pushed the bmp_bgp_open_router_id_and_as_val branch from caa9c57 to 1ba3845 Compare February 6, 2025 16:23
@@ -650,7 +651,7 @@ struct stream *bgp_open_make(struct peer *peer, uint16_t send_holdtime, as_t loc
stream_putw(s, (local_as <= BGP_AS_MAX) ? (uint16_t)local_as
: BGP_AS_TRANS);
stream_putw(s, send_holdtime); /* Hold Time */
stream_put_in_addr(s, &peer->local_id); /* BGP Identifier */
Copy link
Member

Choose a reason for hiding this comment

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

Using peer->bgp->router_id is not enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

bgp_open_make() API is also used to forge regular BGP open streams, and peer->local_id will need to be used. so I have to maintain this change.

@pguibert6WIND pguibert6WIND force-pushed the bmp_bgp_open_router_id_and_as_val branch from 1ba3845 to 7598721 Compare February 10, 2025 08:57
When forging BMP open message, the BGP router-id of tx open message of
the BMP LOC-RIB peer up message is always set to 0.0.0.0, whatever the
configured value of 'bgp router-id'.

Actually, when forging a peer up LOC-RIB message, the BGP router-id
value should be taken from the main BGP instance, and not from the peer
bgp identifier. Fix this by refreshing the router-id whenever a peer up
loc-rib message should be sent.

Signed-off-by: Philippe Guibert <[email protected]>
The transmitted AS value in te tx open message of the peer up loc-rib
message is set to 0. Actually, it should reflect the AS value of the
current BGP instance.

Signed-off-by: Philippe Guibert <[email protected]>
@pguibert6WIND pguibert6WIND force-pushed the bmp_bgp_open_router_id_and_as_val branch from 7598721 to 323d8ed Compare February 11, 2025 10:50
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
Copy link
Member

riw777 commented Feb 11, 2025

E Failed: New core[s] found: /tmp/topotests/bgp_vpnv4_ebgp_vpn_auto.test_bgp_vpnv4_vpn_auto/r1/bgpd_core-sig_11-pid_12380.dmp :-(

@riw777 riw777 merged commit 9af82a2 into FRRouting:master Feb 11, 2025
13 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