Sign in to follow this  
andoma

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

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

Share this post


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.

Share this post


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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this