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

Fix IPV6 src-dest route #16686

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

leonshaw
Copy link
Contributor

Fix issues of IPv6 src-dest route:

(confg)# ipv6 route 1::1/128 from 2::2/128 fe80::1 eth0
  1. staticd doesn't handle them on nht event
  2. linux kernel rejects routes with both source and nexthop object.

Linux kernel currently doesn't support it:

zebra[22993]: [HSYZM-HV7HF] Extended Error: IPv6 routes using source address can not use nexthop objects

Signed-off-by: Xiao Liang <[email protected]>
@@ -2361,6 +2361,7 @@ ssize_t netlink_route_multipath_msg_encode(int cmd, struct zebra_dplane_ctx *ctx
}

if ((!fpm && kernel_nexthops_supported()
&& (p->family != AF_INET6 || !src_p)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we tell the operator about such a thing? Because now we just hide the error/warning being displayed from the kernel, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary. Instead of using nexthop object, just send RTNL message with plain nexthops, as when no zebra nexthop kernel enable is configured. Kernel is happy with this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding a bit of context in the nexthop_groups.rst file to explain this should be sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding a bit of context in the nexthop_groups.rst file to explain this should be sufficient.

nexthop_groups.rst is about nexthop-group configured by user, which is a different thing from kernel nexthop objects. Kernel nexthop is sort of internal implementation of zebra. Is it more suitable to put it in zebra.rst?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure put it in zebra.rst. I want this documented.

@leonshaw leonshaw force-pushed the fix/ipv6-src-route branch from ef6fd77 to 29193fd Compare August 29, 2024 08:26
@github-actions github-actions bot added size/S and removed size/XS labels Aug 29, 2024
Copy link
Member

@donaldsharp donaldsharp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see a documentation update to talk about the limitation of nhg's and source routing. Additionally I would like to see a small test added to show that source routing is properly handled in staticd

Process IPv6 src-dest routes on nht update, otherwise they are not
installed:

    (config)# ipv6 route 1::1/128 from 2::2/128 fe80::1 eth0
    (config)# ipv6 route 1::1/128 from 2::3/128 fe80::1 eth0

Signed-off-by: Xiao Liang <[email protected]>
@leonshaw leonshaw force-pushed the fix/ipv6-src-route branch from 29193fd to 6392442 Compare August 30, 2024 09:32
@frrbot frrbot bot added documentation tests Topotests, make check, etc labels Aug 30, 2024
@github-actions github-actions bot added size/M and removed size/S labels Aug 30, 2024
@leonshaw leonshaw requested a review from donaldsharp October 12, 2024 01:42
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

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