summaryrefslogtreecommitdiffstats
path: root/content/OWNERS
diff options
context:
space:
mode:
authorikarienator@chromium.org <ikarienator@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-04 07:17:27 +0000
committerikarienator@chromium.org <ikarienator@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-04 07:17:27 +0000
commit5c95f099bd5d799cc4ab385ddc443f650d8afb4e (patch)
treee20c45dbcfec1008770e1970dab77302111e1f34 /content/OWNERS
parent6b0dfcdbccbc11317ede24321ee41e79240e6676 (diff)
downloadchromium_src-5c95f099bd5d799cc4ab385ddc443f650d8afb4e.zip
chromium_src-5c95f099bd5d799cc4ab385ddc443f650d8afb4e.tar.gz
chromium_src-5c95f099bd5d799cc4ab385ddc443f650d8afb4e.tar.bz2
Remove net::ServerSocket::setAllowReuseAddress and fix server socket on Windows.
SO_REUSEADDR is useful for server sockets to bind to a recently unbound port. When a socket is closed, the end point changes its state to TIME_WAIT and wait for 2 MSL (maximum segment lifetime) to ensure the remote peer acknowledges its closure. For server sockets, it is usually safe to bind to a TIME_WAIT end point immediately, which is a widely adopted behavior. On Linux SO_REUSEADDR does not enable the TCP socket to bind to an end point that is already bound by another socket. To do that one must set SO_REUSEPORT instead. However, on Windows, SO_REUSEADDR works as if both SO_REUSEDPORT and SO_REUSEADDR are set. Furthermore, A bound end point can be hijacked by another process by setting SO_REUSEADDR. Therefore a Windows-only option SO_EXCLUSIVEADDRUSE was introduced in Windows NT 4.0 SP4. If the socket that is bound to the end point has SO_EXCLUSIVEADDRUSE enabled, it is not possible for another socket to forcibly bind to the end point until the end point is unbound. Also, unlike on *nix, on Windows a TCP server socket can always bind to an end point in TIME_WAIT state without setting SO_REUSEADDR, therefore we cannot emulate a similar behavior of disabling SO_REUSEADDR here. This is considered a security issue and MSDN (http://goo.gl/M6fjQ) recommends all server applications to use SO_EXCLUSIVEADDRUSE. BUG=173533 TBR=brettw@chromium.org Review URL: https://chromiumcodereview.appspot.com/15179003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/OWNERS')
0 files changed, 0 insertions, 0 deletions