ProcessSSDPRequest within FreeBSD Jail
Brought to you by:
jmaggard
When running MiniDLNA within a FreeBSD jail, the "Search for Media" function from PS3 doesn't detect server. The reason is the MiniDLNA server responds to the PS3 using the 239.255.255.250 multicast address as the source IP. I believe this is a result in the ProcessSSDPRequest function, where it finds the network the source IP address is from. In a FreeBSD jail, the NetMask is 255.255.255.255, so will never match the PS3's source network.
I am going to try change the following line from:
if((sendername.sin_addr.s_addr & lan_addr[i].mask.s_addr) == (lan_addr[i].addr.s_addr & lan_addr[i].mask.s_addr))
to:
if((sendername.sin_addr.s_addr & 0xffffff00) == (lan_addr[i].addr.s_addr & 0xffffff00))
After debugging, it looks like the NetMask is actually correct, so I don't know why it's using the multicast IP as a source IP address. Other DLNA/U-PNP-AV servers respond correctly using the server's IP address as the source.