Subject: mDNS issue
From: Andrew Ruthven <andrew.ruthven@catalyst.net.nz>
Date: Wed, 10 Apr 2019 22:26:24 +1200

Hey,

Last week I bought a fancy (okay, 2012 model, but fancy compared to my
last one) Yamaha AV Receiver which has AirPlay built in. There is a
bridge available which will allow me to play music from my Logitech
Slimserver audio server to this Receiver. However, I have slimserver
running inside a vserver guest and the bridge uses mDNS to discover the
AirPlay clients which makes things more complicated.

I have created an interface directory for the vserver as follows:

mkdir 2
echo 224.0.0.251 > 2/ip
touch 2/nodev

As directed by http://linux-vserver.org/Multicast.

Now if I run mdns-scan within the guest it sees a couple of
broadcasts (before I created the interface it crashed), but only a
few. Running strace I see things like:

select(4, [3], NULL, NULL, {tv_sec=0, tv_usec=999968}) = 1 (in [3], left {tv_sec=0,
tv_usec=418726})
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\0\204\0\0\0\0\1\0\0\0\0\rKodi
(lounge)\10_airp"..., iov_len=9000}], msg_iovlen=1, msg_control=[{cmsg_len=28, cmsg_level=SOL_IP,
cmsg_type=IP_PKTINFO, cmsg_data={ipi_ifindex=2, ipi_spec_dst=inet_addr("10.1.0.253"),
ipi_addr=inet_addr("224.0.0.251")}}, {cmsg_len=20, cmsg_level=SOL_IP, cmsg_type=IP_TTL,
cmsg_data=[255]}], msg_controllen=56, msg_flags=0}, 0) = 128
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)

If I run mdns-scan from the host, while running it in the guest then
suddenly a whole raft of entries are displayed within the guest.

Is there something else I need to get the multicast within a guest working?

Host and guest are running Debian Stretch, kernel 4.9.115-vs2.3.9.7-beng
The guest is using a dummy interface and network traffic is routed. If I add an
interface on the local network, then mDNS does work straight away, but I'd rather
not do that if I can get away without it.

Cheers,
Andrew

-- 
Andrew Ruthven, Wellington, New Zealand
MIITP

At work: andrew.ruthven@catalyst.net.nz
At home: andrew@etc.gen.nz
Cloud  : https://catalystcloud.nz
GPG fpr: C603 FC4E 600F 1CEC D1C8  D97C 4B53 D931 E4D3 E863
LCA2020: https://lca2020.linux.org.au/