]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Fix TCP rebinding logic
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 5 Nov 2007 22:40:58 +0000 (17:40 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 30 Jan 2008 07:05:25 +0000 (02:05 -0500)
commit14848456ecd6b7a28850d0379187de9f64f1965c
treea3594508502769d56e838c20b5b094bcc1906b16
parent9385220bc2044ee5e77279cfbe44f09aa9136813
SUNRPC: Fix TCP rebinding logic

Currently the TCP rebinding logic assumes that if we're not using a
reserved port, then we don't need to reconnect on the same port if a
disconnection event occurs. This breaks most RPC duplicate reply cache
implementations.

Also take into account the fact that xprt_min_resvport and
xprt_max_resvport may change while we're reconnecting, since the user may
change them at any time via the sysctls. Ensure that we check the port
boundaries every time we loop in xs_bind4/xs_bind6. Also ensure that if the
boundaries change, we only scan the ports a maximum of 2 times.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprtsock.c