#1033648 minidlna: support socket activation

Package:
minidlna
Source:
minidlna
Description:
lightweight DLNA/UPnP-AV server targeted at embedded systems
Submitter:
Helmut Grohne
Date:
2023-08-11 16:36:02 UTC
Severity:
normal
Tags:
#1033648#5
Date:
2023-03-29 07:56:03 UTC
From:
To:
Hi,

Bug #786929 is about minidlna being unable to bind to network interfaces
and has been unfixed for a long time. Unfortunately, no satisfactory
solution has evolved since. Let me give a try.

Instead of messing with internals of minissdp, I propose outsourcing the
problem to systemd. It provides this feature called "socket activation".
Rather than having minidlna create and bind sockets, have systemd do
this. This is easily done using libsystemd and once we defer this task
to systemd, we can use all the means of customization that systemd
provides (including binding an interface). Doing so also allows binding
a privileged port if desired. I've implemented it in a way that the
feature remains optional. What do you think?

So yeah, this doesn't fix #786929, but it provides a really easy
workaround for any system running systemd without having to set up a
firewall.

Helmut

#1033648#10
Date:
2023-08-11 16:32:10 UTC
From:
To:
I tried this patch with the new upstream release 1.3.3,
see https://salsa.debian.org/bap/minidlna.git branch master
and it didn't really work. I have a computer connected to WiFi and
also a direct ethernet cable connection to a TV, and the TV cable can
bounce up and down, and this patch made things not work. When I did
"systemctl stop minidlna.socket" it started working again. This seemed
replicable. So, I reverted the patch from my fork of the repo.

This is a deep enough issue that any fix, or additional functionality
of this sort, should probably go through upstream rather than just be
a Debian patch.