-
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: fix ipv4-mapped ipv6 use cases #17019
Draft
louis-6wind
wants to merge
13
commits into
FRRouting:master
Choose a base branch
from
louis-6wind:fix-6pe-global
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
louis-6wind
force-pushed
the
fix-6pe-global
branch
from
October 8, 2024 15:08
4b983b5
to
03c525d
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
louis-6wind
force-pushed
the
fix-6pe-global
branch
from
October 11, 2024 08:34
03c525d
to
c8bafbe
Compare
@ton31337 please review this |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Move common checks outside of the loop. Signed-off-by: Louis Scalbert <[email protected]>
Reduce bgp_interface_address_add indentation Signed-off-by: Louis Scalbert <[email protected]>
Log new IPv6 global address in bgp_interface_address_add Signed-off-by: Louis Scalbert <[email protected]>
bgpd keeps on advertising IPv6 prefixes with a IPv6 link-local nexthop after a valid IPv6 global appears. At bgpd startup, the IPv6 global is announced by zebra after the link-local. Only the link-local is advertised. Clearing the BGP sessions make the global to to be announced. Update the nexthops with the global IPv6 when available. Signed-off-by: Louis Scalbert <[email protected]>
This test uses the connected ipv4 mapped ipv6 prefix to resolve the received BGP routes. Signed-off-by: Louis Scalbert <[email protected]> Signed-off-by: Philippe Guibert <[email protected]> Signed-off-by: François Dumontet <[email protected]>
Add bgp_nexthop_mp_ipv4_6 topotest to test to nexhop value with MP-BGP IPv4 and IPv6 on IPv4 peering. The test has route-reflector, route-server, iBGP and eBGP peers. Signed-off-by: Louis Scalbert <[email protected]>
Move common checks outside of the loop. Signed-off-by: Louis Scalbert <[email protected]>
When the IPv6 global is removed on an interface towards a peer, the IPv6 nexthop global that is sent is a IPv4-mapped IPv6 address. It should be the link-local. At removal, replace the global by the next global address or the link-local as last resort. Signed-off-by: Louis Scalbert <[email protected]>
When a peer has no IPv6 global address to send as nexthop, it sends the IPv6 link-local instead as global. "show bgp ipv6 json" displays the same address in global and link-local scopes. > "nexthops": [ > { > "ip": "fe80::a495:38ff:fea6:6ea3", > "afi": "ipv6", > "scope": "global", > "used": true > }, > { > "ip": "fe80::a495:38ff:fea6:6ea3", > "afi": "ipv6", > "scope": "link-local" > } > ] However, "used" key is set on the global nexthop but not in link-local. It is correct but it makes difficult to test JSON to expect the usage of a link-local. The contrary is also correct. Set "used" key on the link-local nexhop instead to facilitate the tests. Signed-off-by: Louis Scalbert <[email protected]>
The code was expected that no IPv6 global address was present but the previous commit was replacing nexthop.v6global by the link-local address instead of un-setting it in case of removal of the IPv6 global. Set also ipv4-mapped ipv6 address as nexthop when a link-local is found and it is an ipv4 prefix over ipv6 nexthop. Signed-off-by: Louis Scalbert <[email protected]>
When a peer sends an IPv4-mapped IPv6 global and a IPv6 link-local nexthop, prefer the link-local unless a route-map tells to use the global. Signed-off-by: Louis Scalbert <[email protected]>
Replace IPv4-mapped IPv6 at update forwarding because the peer may not be able to create a route with the IPv4-mapped IPv6. Signed-off-by: Louis Scalbert <[email protected]>
Test that a IPv4-mapped IPv6 is sent from a peer that has no global IPv6 address. Signed-off-by: Louis Scalbert <[email protected]>
louis-6wind
force-pushed
the
fix-6pe-global
branch
from
October 17, 2024 09:13
c8bafbe
to
7f99625
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re-apply what was reverted in #16615 because of the #16572 regression.
This new pull-requests fixes some ipv4-mapped ipv6 use cases but does not cause this time the #16572 regression.
The reverted pull-requests #16439, #15614 and #15368 are reapplied here with the following changes:
ipv4-mapped ipv6 global nexthop was the cause of the regression with unnumbered peering.