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

Disable IPV6 support #619

Open
dimm0 opened this issue Oct 29, 2024 · 1 comment
Open

Disable IPV6 support #619

dimm0 opened this issue Oct 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@dimm0
Copy link
Contributor

dimm0 commented Oct 29, 2024

Describe the problem to be solved

In dual-stack cluster where only part of nodes support IPV6, spell sometimes can get the master (lease) with V6 address, which will make V4 only nodes not able to use spegel

Proposed solution to the problem

Add an option to disable V6 or disable the master V6

@dimm0 dimm0 added the enhancement New feature or request label Oct 29, 2024
@phillebaba
Copy link
Member

I never considered this when implementing the original support for ipv6. Looking at the current logic it is pretty obvious that this is an issue.

addrFactoryOpt := libp2p.AddrsFactory(func(addrs []ma.Multiaddr) []ma.Multiaddr {
var ip4Ma, ip6Ma ma.Multiaddr
for _, addr := range addrs {
if manet.IsIPLoopback(addr) {
continue
}
if isIp6(addr) {
ip6Ma = addr
continue
}
ip4Ma = addr
}
if ip6Ma != nil {
return []ma.Multiaddr{ip6Ma}
}
if ip4Ma != nil {
return []ma.Multiaddr{ip4Ma}
}
return nil
})

Basically if the leader is a node with both ipv4 and ipv6 interfaces it will choose the ipv6 first. We have a couple of options here. Either as you suggested we allow disabling of ipv6 all together. The other option is to flip the logic to use ipv4 first, which in a scenario where both ipv4 and ipv6 is supported we will use ipv4. This however could be something that other users do not want in a dual stack cluster. Our third option which I am unsure of how that would work is to bind to both interfaces, allowing for either ipv4 or ipv6 p2p connections.

I think the first step is to get a dual stack cluster up and running for e2e tests. The second thing we can do is to look at what other solutions do to solve this issue.

@phillebaba phillebaba moved this to Todo in Roadmap Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants