Bug 45858 - module-zeroconf-discover gets highly confused when two network interfaces are in the same network segment
Summary: module-zeroconf-discover gets highly confused when two network interfaces are...
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 13:34 UTC by Rudd-O
Modified: 2018-07-30 10:18 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Rudd-O 2012-02-09 13:34:03 UTC
When two network interfaces are in the same network segment, and a remote server is available, avahi reports this:


~@karen.dragonfear α:
avahi-browse -a | grep pulse
+  wlan0 IPv4 pulse@paola.dragonfear                        PulseAudio Sound Server local
+  wlan0 IPv4 pulse@paola.dragonfear: Internal Audio        PulseAudio Sound Sink local
+   p5p1 IPv4 pulse@paola.dragonfear: Internal Audio        PulseAudio Sound Sink local
+   p5p1 IPv4 pulse@paola.dragonfear                        PulseAudio Sound Server local

And the sink appears in the local server as a remote sink.

When one network interface is disconnected, this happens in avahi:

-   p5p1 IPv4 pulse@paola.dragonfear                        PulseAudio Sound Server local
-   p5p1 IPv4 pulse@paola.dragonfear: Internal Audio        PulseAudio Sound Sink local

The sink DISAPPEARS from pulseaudio volume control.  However both sink and server CONTINUE to be available in wlan0:

+  wlan0 IPv4 pulse@paola.dragonfear                        PulseAudio Sound Server local
+  wlan0 IPv4 pulse@paola.dragonfear: Internal Audio        PulseAudio Sound Sink local

Note that, at this point, connecting p5p1 again makes the sink reappear in pulseaudio volume control.

This points to a bug in module-zeroconf-discover, where it does the simpleton thing of adding a sink by name when it sees the sink appear, and removes it when it sees the sink disappear.

What it should do instead, is keep a reference count to the sink, and increment the count when it appears on a network interface in avahi, decrement the count when it disappears on a network interface, and only display it as an available sink when the reference count is >0.  Alternatively, PA zeroconf-discover could consult avahi to see if a sink with the same name continues to be available in another network interface.

Thanks in advance for the fix!  :-)
Comment 1 GitLab Migration User 2018-07-30 10:18:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/336.


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.