How does UpnP / DLNA work in LEDE?

I have a new LEDE device (my first) up and running for a few days. Everything is good except some of my UPnP devices aren't able to discover, and the ones that can take a while to do so. With the replaced router everything worked fine (as it does if I put it back) so I guess it is something to do with my LEDE setup.

I have a number of televisions acting as clients and three servers. Two of these are Panasonic PVR machines and one is a Linux box running Mediatomb. All clients and servers are connected by wire to an unmanaged switch that is connected to one of the ethernet ports of my LEDE router.

The two PVR machines are detected after a delay but the Linux box isn't. With the old router in place detection is immediate. I am confused because I thought that the LAN traffic wouldn't even get to the router, being handled within the switch. Obviously I have that wrong.

SO can someone explain quickly how it works and what I need to do in LEDE to make it work please?

What I do know is about SSDP and I have used wireshark to ensure that the SSDP M-SEARCH packets are reaching the Linux server. I also know the Linux server is detected if I restart the Mediatomb software running on it, forcing it to send a NOTIFY broadcast. So I presume it's some missing network routing that makes the multicast stuff work properly, but I don't know what.

I did read about adding a route like route add -net netmask br0 on the server and I tried it but it didn't help.

I have read about installing upnp packages on LEDE but I presumed (perhaps incorrectly) those were for running a server on the router itself, which I don't want to do.

Any guidance greatly appreciated.

Not sure if it'd help, but I've had issues with some devices failing to discover Chromecast on local network until I've done:

echo "iptables -I INPUT -p udp -m udp --dport 32768:61000 -j ACCEPT" >> /etc/firewall.user
uci set firewall.@include[0].path=/etc/firewall.user
uci commit firewall
/etc/init.d/firewall reload

PS. Not sure what UPnP has to do with it, isn't UPnP mostly for local services to open ports on router so that they'd be accessible from WAN.

DLNA is a standardised implementation of UPnP for consumer Audiovisual devices on a local area network.

I am definately not talking about UPnP on the WAN. That I definitely don't want. So i am not sure iptables is the problem here as it's all LAN.

I think I have gotten to the bottom of this issue and it is nothing to do with LEDE.

My server was not responding to M-SEARCH queires despite them arriving on the interface and not being firewalled. After much investigation I read about an issue with multicast snooping on a bridge interface. Since the server does indeed have a bridge, I disabled this with echo 0 > /sys/devices/virtual/net/br0/bridge/multicast_snooping and the the problem went away.

I can only presume (I haven't the time to investigate) that the old replaced router was somehome causing UPnP devices to frequently renotify themselves and thereby masked the actual issue on my server. When I replaced that router with a new LEDE one that stopped happening and thereby unmasked the real issue which I hope that I have now solved :slight_smile: