-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Bmp locrib bgp open message #19063
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 locrib bgp open message #19063
Conversation
|
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 */ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
48580e1 to
7ab7533
Compare
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]>
7ab7533 to
a0f041d
Compare
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]>
a0f041d to
613ffb8
Compare
|
ci:rerun |
riw777
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
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.