-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bgpd: add the bgp_zebra_announce_dest() function #16393
base: master
Are you sure you want to change the base?
bgpd: add the bgp_zebra_announce_dest() function #16393
Conversation
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
Failures look related --
|
@@ -1722,11 +1727,7 @@ void bgp_zebra_announce_table_all_subtypes(struct bgp *bgp, afi_t afi, | |||
return; | |||
|
|||
for (dest = bgp_table_top(table); dest; dest = bgp_route_next(dest)) | |||
for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) | |||
if (CHECK_FLAG(pi->flags, BGP_PATH_SELECTED) && | |||
pi->type == ZEBRA_ROUTE_BGP) |
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.
the tests in the new function doesn't look the same - that seems ... questionable?
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 added a parameter to handle this case.
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.
What about pi->subtype and BGP_ROUTE_NORMAL, the new code tests for this as well, when before it doesn't. This looks like it would break STATIC/AGGREGATES/REDISTRIBUTION here right?
Split the bgp_zebra_announce_table() in two. The bgp_dest pointer is given to the bgp_zebra_announce_dest(), which will install only the selected bgp_path_info. Signed-off-by: Philippe Guibert <[email protected]>
3e79318
to
3004ecd
Compare
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'd like a better understanding of the changes first.
@@ -1722,11 +1727,7 @@ void bgp_zebra_announce_table_all_subtypes(struct bgp *bgp, afi_t afi, | |||
return; | |||
|
|||
for (dest = bgp_table_top(table); dest; dest = bgp_route_next(dest)) | |||
for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) | |||
if (CHECK_FLAG(pi->flags, BGP_PATH_SELECTED) && | |||
pi->type == ZEBRA_ROUTE_BGP) |
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.
What about pi->subtype and BGP_ROUTE_NORMAL, the new code tests for this as well, when before it doesn't. This looks like it would break STATIC/AGGREGATES/REDISTRIBUTION here right?
This PR is stale because it has been open 180 days with no activity. Comment or remove the |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Split the bgp_zebra_announce_table() in two. The bgp_dest pointer is given to the bgp_zebra_announce_dest(), which will install only the selected bgp_path_info.