diff options
author | NeilBrown <neilb@suse.de> | 2021-06-15 04:18:38 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-06-21 19:06:16 +0300 |
commit | bc1c56e9bbe92766d017efb5f0a0c71f80da5570 (patch) | |
tree | 489d8d1a2267007ccc852f7a3d20912ffebf3214 /fs/fat | |
parent | bb24cc0f37a2d12f780ab2a57df046274a0bec38 (diff) | |
download | linux-bc1c56e9bbe92766d017efb5f0a0c71f80da5570.tar.xz |
SUNRPC: prevent port reuse on transports which don't request it.
If an RPC client is created without RPC_CLNT_CREATE_REUSEPORT, it should
not reuse the source port when a TCP connection is re-established.
This is currently implemented by preventing the source port being
recorded after a successful connection (the call to xs_set_srcport()).
However the source port is also recorded after a successful bind in xs_bind().
This may not be needed at all and certainly is not wanted when
RPC_CLNT_CREATE_REUSEPORT wasn't requested.
So avoid that assignment when xprt.reuseport is not set.
With this change, NFSv4.1 and later mounts use a different port number on
each connection. This is helpful with some firewalls which don't cope
well with port reuse.
Signed-off-by: NeilBrown <neilb@suse.de>
Fixes: e6237b6feb37 ("NFSv4.1: Don't rebind to the same source port when reconnecting to the server")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/fat')
0 files changed, 0 insertions, 0 deletions