summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorChris Perl2014-09-05 21:40:21 +0200
committerTrond Myklebust2014-09-10 21:47:00 +0200
commit0f7a622ca61621f951af01448b956f2ecf5fad99 (patch)
treeb710a85099abafaeae8ee498599d88d13f613891 /arch
parentpnfs: fix filelayout_retry_commit when idx > 0 (diff)
downloadkernel-qcow2-linux-0f7a622ca61621f951af01448b956f2ecf5fad99.tar.gz
kernel-qcow2-linux-0f7a622ca61621f951af01448b956f2ecf5fad99.tar.xz
kernel-qcow2-linux-0f7a622ca61621f951af01448b956f2ecf5fad99.zip
rpc: xs_bind - do not bind when requesting a random ephemeral port
When attempting to establish a local ephemeral endpoint for a TCP or UDP socket, do not explicitly call bind, instead let it happen implicilty when the socket is first used. The main motivating factor for this change is when TCP runs out of unique ephemeral ports (i.e. cannot find any ephemeral ports which are not a part of *any* TCP connection). In this situation if you explicitly call bind, then the call will fail with EADDRINUSE. However, if you allow the allocation of an ephemeral port to happen implicitly as part of connect (or other functions), then ephemeral ports can be reused, so long as the combination of (local_ip, local_port, remote_ip, remote_port) is unique for TCP sockets on the system. This doesn't matter for UDP sockets, but it seemed easiest to treat TCP and UDP sockets the same. This can allow mount.nfs(8) to continue to function successfully, even in the face of misbehaving applications which are creating a large number of TCP connections. Signed-off-by: Chris Perl <chris.perl@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions