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 ipv6 nexthop-local unchanged #17037

Merged
merged 4 commits into from
Oct 11, 2024

Conversation

louis-6wind
Copy link
Contributor

@louis-6wind louis-6wind commented Oct 8, 2024

#16219 attempted to solve #16198 issue but removed ipv6 link-local nexthop in situation it was legitimate. For example, when an ipv4-mapped IPv6 address is present in global IPv6 nexthop, the link-local is also useful if the peer does not understand the ipv4-mapped IPv6 address format.

Revert #16219 and apply fixes to the "ipv6 nexthop-local unchanged" behavior. When the parameter is present:

  • don't insert a link-local when the origin peer does not send any link-local
  • reset the link-local of the origin peer to the local router link-local when the origin and destination peer does not share the same network

Add a topotest to check the ipv6 nexthops in various situations including the use case from #16219 (comment) and #17037 (comment)

@louis-6wind louis-6wind marked this pull request as ready for review October 9, 2024 14:52
@louis-6wind louis-6wind changed the title bgpd: check route-reflector on the same network. Revert 16219 bgpd: fix ipv6 nexthop-local unchanged Oct 9, 2024
@louis-6wind
Copy link
Contributor Author

ci:rerun

bgpd/bgp_route.c Outdated Show resolved Hide resolved
Do not add an IPv6 link-local nexthop if the originating peer does not
provide one and the nexthop-local unchanged setting is enabled.

Signed-off-by: Louis Scalbert <[email protected]>
If the "nexthop-local unchanged" setting is enabled, it preserves the
IPv6 link-local nexthop from the originating peer. However, if the
originating and destination peers are not on the same network segment,
the originating peer's IPv6 link-local address will be unreachable from
the destination peer.

In such cases, reset the IPv6 link-local nexthop, even if "nexthop-local
unchanged" is set on the destination peer.

Signed-off-by: Louis Scalbert <[email protected]>
Add bgp_nexthop_ipv6 to check the ipv6 link-local nexthop conformity in
several situations.

Signed-off-by: Louis Scalbert <[email protected]>
@ton31337
Copy link
Member

@Mergifyio backport dev/10.2

Copy link

mergify bot commented Oct 11, 2024

backport dev/10.2

✅ Backports have been created

@ton31337 ton31337 added this to the 10.2 milestone Oct 11, 2024
@ton31337 ton31337 merged commit 813a9f6 into FRRouting:master Oct 11, 2024
11 checks passed
louis-6wind added a commit to louis-6wind/frr that referenced this pull request Oct 11, 2024
AS 65000  | AS 65001
          |
      RR  |
       |  |
R1 --- | --- R2
          |

When r1 peer is an iBGP route reflector client of rr and r2 peer is a
eBGP neighbor of rr, and all three routers shares the same network, r2
receives announcements coming from r1 with a IPv6 link-local nexthop
from rr. This is incorrect as r2 should send traffic to r1 without
involving rr.

Do not send an IPv6 link-local nexthop if the originating peer is a
route-reflector client.

Link: FRRouting#16219 (comment)
Link: FRRouting#17037 (comment)
Signed-off-by: Louis Scalbert <[email protected]>
ton31337 added a commit that referenced this pull request Oct 11, 2024
bgpd: fix ipv6 nexthop-local unchanged (backport #17037)
louis-6wind added a commit to louis-6wind/frr that referenced this pull request Oct 14, 2024
AS 65000  | AS 65001
          |
      RR  |
       |  |
R1 --- | --- R2
          |

When r1 peer is an iBGP route reflector client of rr and r2 peer is a
eBGP neighbor of rr, and all three routers shares the same network, r2
receives announcements coming from r1 with a IPv6 link-local nexthop
from rr. This is incorrect as r2 should send traffic to r1 without
involving rr.

Do not send an IPv6 link-local nexthop if the originating peer is a
route-reflector client.

Link: FRRouting#16219 (comment)
Link: FRRouting#17037 (comment)
Signed-off-by: Louis Scalbert <[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