[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

twisteroid ambassador report at bugs.python.org
Wed May 22 12:02:14 EDT 2019


twisteroid ambassador <twisteroid.ambassador at gmail.com> added the comment:

AFAIK the reason why scope id is required for IPv6 is that every IPv6
interfaces has its own link-local address, and all these addresses are in
the same subnet, so without an additional scope id there’s no way to tell
from which interface an address can be reached. IPv4 does not have this
problem because IPv4 interfaces usually don’t use link-local addresses.

Michael Felt <report at bugs.python.org>于2019年5月22日 周三18:08写道:

>
> Michael Felt <aixtools at felt.demon.nl> added the comment:
>
> On 22/05/2019 10:43, Michael Felt wrote:
> > 'fe80::1%1' <> 'fe80::1' - ... I am not 'experienced' with IPv6 and
> scope.
>
> >From what I have just read (again) - scope seems to be a way to indicate
> the interface used (e.g., eth0, or enp0s25) as a "number".
>
> Further, getsockname() (and getpeername()) seem to be more for after a
> fork(), or perhaps after a pthread_create(). What remains unclear is why
> would I ever care what the scopeid is.  Is it because it is "shiney",
> does it add security (if so, how)?
>
> And, as this has been added - what breaks in Python when "scopeid" is
> not available?
>
> I am thinking, if adding a scopeid is a way to assign an IPv6 address to
> an interface - what is to prevent abuse? Why would I even want the same
> (link-local IP address on eth0 and eth1 at the same time? Assuming that
> it what it is making possible - the same IPv6/64 address on multiple
> interfaces and use scope ID to be more selective/aware. It this an
> alternative way to multiplex interfaces - now in the IP layer rather
> than in the LAN layer?
>
> If I understand why this is needed I may be able to come up with a way
> to "get it working" for the Python model of interfaces - although,
> probably not "fast".
>
> Regards,
>
> Michael
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <https://bugs.python.org/issue35545>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35545>
_______________________________________


More information about the Python-bugs-list mailing list