Opened 11 years ago

Last modified 4 years ago

#3014 enhancement new

— at TCP over IPv6 (patch)Initial Version

Reported by: David Ripton Owned by: Glyph
Priority: high Milestone:
Component: core Keywords: ipv6
Cc: therve, cassidy, Jean-Paul Calderone, jknight, Thijs Triemstra, Nicolas Pouillard, Martin Marcher, Andrew Cooper, thomasvs, honglei jiang Branch:
Author: therve


Here's my attempt to add TCP over IPv6 to Twisted. passes for me. (Note that if IPv6 isn't enabled on your box, it will whine about int vs. string errors, caused by twisted.python.compat redefining socket.AF_INET6. Try "ping6 ::1" if you're not sure.)

No UDP code yet. Later.

Scoped getaddrinfo lookups are a weak point. The problem is that link-local IPv6 addresses (the only kind most people probably have, except for loopback) are only valid when scoped to the right interface. So 'ping6 fe80::217:31ff:fe53:fa10' fails while 'ping6 fe80::217:31ff:fe53:fa10%eth0' succeeds. Unfortunately the latter syntax is not universal. There are various ways to find the right scopeid to insert into the sockaddr tuple, but I'm not sure how portable they are, and they'd complicate the basic Twisted resolver logic, so I didn't bother yet.

Yes, there's massive code duplication between and, and between and Suggestions welcome. (One obvious suggestion is to have every class in _tcp6 inherit from the one in tcp. My first attempt at that was buggy, but I can try again.)

Change History (0)

Note: See TracTickets for help on using tickets.