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

bgpd: fix AIGP calculation in route advertisement #17168

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

enkechen-panw
Copy link
Contributor

Currently the AIGP is always incremented when a route with the
attribute is advertised. That is incorrect when the nexthop is
unchanged, as is commonly the case in route reflection.

Adjust the AIGP for propagation only when the nexthop is set
to ourselves.

@frrbot frrbot bot added bgp bugfix tests Topotests, make check, etc labels Oct 20, 2024
bgpd/bgp_route.c Outdated Show resolved Hide resolved
@ton31337 ton31337 added this to the 10.2 milestone Oct 21, 2024
@ton31337
Copy link
Member

@Mergifyio backport dev/10.2 stable/10.1 stable/10.0 stable/9.1 stable/9.0

Copy link

mergify bot commented Oct 21, 2024

backport dev/10.2 stable/10.1 stable/10.0 stable/9.1 stable/9.0

✅ Backports have been created

@ton31337
Copy link
Member

Could you fix the styling?

@enkechen-panw
Copy link
Contributor Author

It seems the styling suggestions are about characters in a line (100?). That's optional, isn't it?

@donaldsharp
Copy link
Member

Please use clang-format to ensure proper code indentation

@enkechen-panw
Copy link
Contributor Author

I have been using "checkpatch.pl". Is there a way to run the clang-format check myself?

In this topotest, the route reflector advertises a route with the
aigp attribute to its client, some with the nexthop unchanged and
some with the nexthp changed. Different aigp values are sent to
the clients depending on the nexthop setting.

Signed-off-by: Enke Chen <[email protected]>
Currently the AIGP is always incremented when a route with the
attribute is advertised. That is incorrect when the nexthop is
unchanged, as is commonly the case in route reflection.

Adjust the AIGP for propagation only when the nexthop is set
to ourselves.

Signed-off-by: Enke Chen <[email protected]>
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