diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-02-21 13:43:44 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-02-21 13:43:44 +0000 |
commit | b2618e5cbc184491e4691bcb383b9669d82a725c (patch) | |
tree | 1215415a36c26a89eab2f5294ad63d92f09d2b58 /common/rfb/SecurityServer.cxx | |
parent | ccb92454bf1984eea9451081232de90fa5dd7564 (diff) | |
download | tigervnc-b2618e5cbc184491e4691bcb383b9669d82a725c.tar.gz tigervnc-b2618e5cbc184491e4691bcb383b9669d82a725c.zip |
Using a fixed port range with -via can cause a race condition between multiple vncviewer instances, whereby one instance calls bind() and finds the port to be free, then another instance calls bind() and finds the same port to be free, because the first instance hasn't started the SSH tunnel on it yet. This patch works around the issue by using ephemeral ports. All known modern O/S's increment the ephemeral port number by 1 after bind(), so the port is effectively "reserved" after bind(), and this prevents another vncviewer instance from trying to reserve the same port.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4303 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/SecurityServer.cxx')
0 files changed, 0 insertions, 0 deletions