Tidal icon indicating copy to clipboard operation
Tidal copied to clipboard

IPv6 support

Open yaxu opened this issue 4 years ago • 5 comments

Currently Tidal only works with ipv4 addresses. "localhost" now resolves to ipv6 address on many systems so we have to spell out "127.0.0.1". It's probably time to fix this!

yaxu avatar Feb 24 '21 09:02 yaxu

It looks like hosc currently hard-codes IPv4 sockets here and here.

I was testing out a patch that would fix that when I noticed another issue: it seems that any software that listens to IPv4 addresses won't receive IPv6 traffic. In my testing, that seemed to definitely be the case with supercollider.

At least for target addresses, I think it makes sense to alias "localhost" to "127.0.0.1" on the Tidal side. The Target record could have a field clarifying whether the target expects v4 or v6 traffic.

matthewkaney avatar Feb 26 '21 20:02 matthewkaney

(Actually, getAddrInfo will still resolve "localhost" to "127.0.0.1" if you give it a hint expressing your preference for IPv4. Hosc should be doing that.)

matthewkaney avatar Feb 26 '21 20:02 matthewkaney

Ah that's good to know. Not a lot of point in implementing ipv6 then, no-one has actually requested it.. But it would be nice to lead the way. @rd-- might well be interested in a patch.

I see that liblo supports but disables ipv6 by default:

IPv6 NOTICE
liblo was written to support both IPv4 and IPv6, however it has caused various problems along the way because most of the currently available OSC applications like Pd and SuperCollider don't listen on IPv6 sockets. IPv6 is currently disabled by default

It'd be good to get to the bottom of these problems.

yaxu avatar Feb 26 '21 21:02 yaxu

hello alex - i added {N.addrFamily = N.AF_INET} hints as suggested above (i think) - i use dotted notation so i've not seen this - let me know if anything else needs correcting - best, rohan

rd-- avatar Feb 27 '21 00:02 rd--

Yes, that's exactly what I was suggesting—thanks!

matthewkaney avatar Feb 27 '21 01:02 matthewkaney