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

Rejects network with gateway outside subnet #2221

Open
waldiTM opened this issue Oct 31, 2024 · 1 comment
Open

Rejects network with gateway outside subnet #2221

waldiTM opened this issue Oct 31, 2024 · 1 comment

Comments

@waldiTM
Copy link

waldiTM commented Oct 31, 2024

Creating an IPv6 subnet using podman fails if the gateway is not inside the subnet itself. In IPv6 this is a rather common setup, where the gateway uses the link-local range fe80::/10.

With IPv6 in Linux, using such a link-local address will just work with a normal routing setup. With IPv4 in Linux this will in theory also work, by using the special "onlink" flag.

Error: gateway fe80::1 not in subnet 2001::db8::/48
@Luap99
Copy link
Member

Luap99 commented Dec 4, 2024

If ipv4 requires extra netlink option then this would need to be added in netavark. Although I don't think many would use an ipv4 gateway in another subnet?
For ipv6 I think you are right we likely should just drop that check? Does that only work for the link local range? In that case we should likely only allow the link local address and still reject others.

Interested in opening a PR to implement that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants