Menu

#114 Fix Broken SSDP Multicast Membership Addition.

Unstable (example)
closed-accepted
5
2014-11-04
2014-03-31
whosane
No

When attempting to compile and use miniDLNA on DD-WRT i can across the following error.
My configuration has "network_interfact=br0"

[2014/03/31 12:13:13] minissdp.c:78: error: setsockopt(udp, IP_ADD_MEMBERSHIP): No such device
[2014/03/31 12:13:13] minissdp.c:178: warn: Failed to add multicast membership for address

This however works just fine with CentOS though.

Debugging :
I created a sample program from the code in getifaddr.c (test.c attached) and dumped the interfaces to the console.
These are the interfaces on DD-WRT and CentOS

DD-WRT
Interface : vlan2 : 192.168.1.2
Interface : br0 : 10.0.0.1
Interface : br0:0 : 169.254.255.1

CentOS
Interface : eth3 : 10.0.0.139

Reason :
In the function getifaddr (getifaddr.c) we find that "&lan_addr[i]" (line 154) is being passed to the OpenAndConfSSDPNotifySocket function.
In the case of the interfaces on dd-wrt, "i != n_lan_addr" since for vlan2, "i" was incremented but "n_lan_addr" was not. Hence, the
OpenAndConfSSDPNotifySocket is actually getting passed an uninitialized structure.

I've attached a patch to help fix this issue.

2 Attachments

Discussion

  • Justin Maggard

    Justin Maggard - 2014-03-31
    • status: open --> closed-accepted
    • assigned_to: Justin Maggard
     
  • Justin Maggard

    Justin Maggard - 2014-03-31

    Applied, thanks!

     

Log in to post a comment.