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.
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
Interface : vlan2 : 192.168.1.2
Interface : br0 : 10.0.0.1
Interface : br0:0 : 169.254.255.1
Interface : eth3 : 10.0.0.139
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.
Log in to post a comment.