#77 Allowing SSDP M-SEARCH from other subnets

open
5
2013-11-18
2012-02-29
Fredrik Svensson
No

This patch was in response to the Help I got regarding :
https://sourceforge.net/projects/minidlna/forums/forum/879957/topic/5062120

It is only active when one interface is configured : n_lan_addr == 1
I have tested the code here, and I can play a movie over the network.
The patch was created against the debian package minidlna-1.0.23+dfsg, but I think
it should be easy enough to apply in CVS.

If there is anything I can do to improve the patch let me know.

Thanks

Discussion

  • pasdVn
    pasdVn
    2013-11-18

    I tried to implement a more clean sollution of this issue.
    The wrong assumption in the current code is, that the tcp/ip stack of the kernel does not a correct filtering of udp multicasts, but is does. The socket only provides datagramms from that interfaces, we added a ip multicast membership for.
    Additionally, when we receive a datagramm, we can ask the kernel which interface received it, so that we dont't have to rely on the current same-subnet-hack for getting the interface adress we need to put in to the ssdp-response.

    Maybe somebody should try it on other platforms, but for me it works at least with linux kernel.

    Additional hint:
    I also noticed, that the current feature of limiting minidlna to certain interfaces is only implemented for ssdp, but (at least) not for http (the socket for media transport). So if this really should be someting like a security feature the http (and all other) server-sockets should be splitted by interface!?