Please bind SSDP using SO_REUSEADDR (On OS X and probably Linux too)


andoma

Recommended Posts

It seems to me that BitTorrent Sync (1.1.15 on OS X) does not bind the SSDP (used for UPnP/DLNA) port using SO_REUSEADDR.

This prohibits other UPnP apps on the same host from receiving SSDP packets (ie, those apps does not function at all). Those other apps will fail to bind (Address already in use).

Most unix like systems allows multiple processes to bind the same UDP multicast port if all of them set SO_REUSEADDR before binding.

Also see: http://stackoverflow.com/questions/577885/uses-of-so-reuseaddr

Please fix this and I'll be an even more happy user of this awesome tool.

/andoma

Link to post
Share on other sites

In OSX you have to use both SO_REUSEADDR and SO_REUSEPORT. BTSync sets these flags for SSDP listen socket. But if some other app doesn't use SO_REUSEPORT (since SO_REUSEADDR is enough in Linux), it will fail to bind to the same port.

Link to post
Share on other sites

In OSX you have to use both SO_REUSEADDR and SO_REUSEPORT. BTSync sets these flags for SSDP listen socket. But if some other app doesn't use SO_REUSEPORT (since SO_REUSEADDR is enough in Linux), it will fail to bind to the same port.

I stand corrected. Thanks for the info!

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.