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

feat: support ipv6 link-local address #2660

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

Conversation

jclab-joseph
Copy link

@jclab-joseph jclab-joseph commented Dec 6, 2023

Close #2659 .
Make it possible to connect to the link-local address.

Note that
To work with mdns, must also modify https://github.com/libp2p/zeroconf.

@jclab-joseph jclab-joseph force-pushed the feat/support-ipv6-link-local-address branch from 56755fb to 0639a3a Compare December 6, 2023 08:12
Copy link
Contributor

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

Is there any reason why a well-behaved peer would ever advertise an ip6zone address? I can’t see any, but I might be missing something.

If that’s the case, we don’t need to make any changes to the TCP transport.

@jclab-joseph
Copy link
Author

@marten-seemann

As an example, an IoT node before IP is set can use it to communicate via p2p.
IPv6 link-local address can be used even if a static IP is not set.
In this case, you can communicate by searching for each other using mdns, etc. within the local network.

Since link-local address cannot be used on the Internet, it was intentionally excluded from announce.

@marten-seemann
Copy link
Contributor

What do you mean by „before the IP address is set“? Are you referring to DHCP?

How would and ip6zone address passed to the TCP transport look like?

@jclab-joseph
Copy link
Author

@marten-seemann
To be exact, it is an environment without DHCP. In an environment with DHCP, there is no need to use link-local address.
e.g. /ip6zone/eth0/ip6/fe80::3811:2aff:fe94:adbe/tcp/1234

@marten-seemann
Copy link
Contributor

Can you just advertise /ip6/fe80::3811:2aff:fe94:adbe/tcp/1234? For the peer, it’s irrelevant that it’s on your eth0 interface, right?

@jclab-joseph jclab-joseph force-pushed the feat/support-ipv6-link-local-address branch from 0639a3a to 1f421f9 Compare December 6, 2023 09:59
@jclab-joseph
Copy link
Author

jclab-joseph commented Dec 6, 2023

@marten-seemann Currently, link-local addresses are intentionally excluded from basic_host.
Is there a reason to announce it? A link-local address is only useful if the receiving party can determine the listening interface, such as mdns.
I thought it would be a good idea not to advertise unnecessary addresses. Still, is it better to advertise?

@marten-seemann
Copy link
Contributor

A link-local address is only useful if the receiving party can determine the listening interface, such as mdns.

I don't understand how this would work. What is configured to be eth0 is only relevant to me, not to the remote node. Therefore, we should never advertise it.

@marten-seemann
Copy link
Contributor

Please don't reply here. Let's move discussion of this back to the issue: #2659.

@jclab-joseph jclab-joseph force-pushed the feat/support-ipv6-link-local-address branch from 1f421f9 to f1a42fe Compare December 7, 2023 08:08
@marten-seemann marten-seemann added the status/blocked Unable to be worked further until needs are met label Dec 7, 2023
@marten-seemann
Copy link
Contributor

I'm adding the blocked label here, since there's little point in moving this PR forward until we've resolved libp2p/zeroconf#35.

Once that has been done, we still need to decide if support IPv6 link-local is something we want to do, see #2659 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/blocked Unable to be worked further until needs are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proper support for IPv6 link-local addresses
2 participants