Summary: | Error connecting to PulseAudio server via IPv6 | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Ryan <rvanderbijl+freedesktop> |
Component: | daemon | Assignee: | pulseaudio-bugs |
Status: | RESOLVED FIXED | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | hector, jonny.lamb, lennart |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Proposed patch |
Description
Ryan
2011-09-11 07:18:43 UTC
I'm not an expert either, but when I was experimenting with IPv6, I ran to similar problems. I wrote some notes for myself, pasted below: Link-local addresses (fe80::/16) are not very useful ==================================================== bind() can have difficulties with link-local addresses, and therefore it's common that server programs can't listen on link-local addresses. So, don't use link-local addresses. Instead, set up unique local addresses (http://en.wikipedia.org/wiki/Unique_local_address) on all machines if you for some reason can't or don't want to use public IP addresses. Setting up unique local addresses ================================= A unique local address (ULA) is an address that is very likely globally unique, but not routed in the public internet. See http://en.wikipedia.org/wiki/Unique_local_address. Randomness of the subnet part is important when using ULAs. A new subnet address can be easily generated at http://www.sixxs.net/tools/grh/ula/. The subnet for my home network is fdc5:4fe5:888d::/64. So I think your suggestion that Pulseaudio or Avahi should refuse to publish link-local addresses is a good one. The problem is that a IPv6 link local destination require the interface to be specified.
If you manually load module-tunnel-sink with exact same arguments that failed but with the address suffixed with "%eth0" (or whatever interface it is on) it will load fine. For example
$ pacmd
Welcome to PulseAudio! Use "help" for usage information.
>>> load-module module-tunnel-sink server=[fe80::21f:e2ff:fe5c:1e2%eth0]:4713 sink=alsa_output.pci-0000_00_1b.0.analog-stereo format=s16le channels=2 rate=44100 sink_name=tunnel.hermes.local.alsa_output.pci-0000_00_1b.0.analog-stereo channel_map=front-left,front-right
I notice that "avahi-browse -a" shows interfaces. Presumably then, avahi makes this information is available, so not including the interface suffix on IPv6 link local address is a bug in the zeroconf modules.
Cheers! -Tyson
Created attachment 63872 [details] [review] Proposed patch Attached patch fixes the issue for me. Note that the interface can be specified as the actual iface name, or as just the numerical index. Avahi gives us the index, so we just use that (even though it's less human-readable). Any feedback on the patch? This is still open 18 months after I provided a patch that fixes it. It's a bit sad that I've had to keep this in my patches directory for PA for this long. Sorry, your patch was completely forgotten. I now applied it: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=4e5051db7297d8171d148ef7d15c2e06ebeff0ce |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.