Hi Steven
Does the following patch fix the issue you reported?
Cheers
Trond
Trond Myklebust (1):
SUNRPC: Force a close when a socket keepalive timeout occurs
net/sunrpc/xprtsock.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--
2.7.4
Signed-off-by: Trond Myklebust <[email protected]>
---
net/sunrpc/xprtsock.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 7e2b2fa189c3..19a44d844078 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -787,11 +787,17 @@ static void xs_error_report(struct sock *sk)
goto out;
err = -sk->sk_err;
- if (err == 0)
+ switch (err) {
+ case 0:
goto out;
- /* Is this a reset event? */
- if (sk->sk_state == TCP_CLOSE)
- xs_sock_mark_closed(xprt);
+ case -ETIMEDOUT:
+ xprt_force_disconnect(xprt);
+ break;
+ default:
+ /* Is this a reset event? */
+ if (sk->sk_state == TCP_CLOSE)
+ xs_sock_mark_closed(xprt);
+ }
dprintk("RPC: xs_error_report client %p, error=%d...\n",
xprt, -err);
trace_rpc_socket_error(xprt, sk->sk_socket, err);
--
2.7.4
On Thu, 14 Jul 2016 19:02:59 -0400
Trond Myklebust <[email protected]> wrote:
> Hi Steven
>
> Does the following patch fix the issue you reported?
I'll see if I can try it out tomorrow. My server that has the issue is
currently in use. I'll also be traveling on Saturday, so if I can't get
to it tomorrow, I'll definitely get to it when I get back on Monday the
25th.
Thanks!
-- Steve
On Thu, 14 Jul 2016 19:02:59 -0400
Trond Myklebust <[email protected]> wrote:
> Hi Steven
>
> Does the following patch fix the issue you reported?
I just tested it out, and unfortunately, even with this patch, after
the disconnect, the hidden port is still there.
# while :; do if ! netstat -tapn |grep :812; then break; fi; sleep 1; done;
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
[..]
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
[..]
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
# unhide-tcp
Unhide-tcp 20130526
Copyright © 2013 Yago Jesus & Patrick Gouin
License GPLv3+ : GNU GPL version 3 or later
http://www.unhide-forensics.info
Used options:
[*]Starting TCP checking
Found Hidden port that not appears in ss: 812
[*]Starting UDP checking
Thanks,
-- Steve
>
> Cheers
> Trond
>
> Trond Myklebust (1):
> SUNRPC: Force a close when a socket keepalive timeout occurs
>
> net/sunrpc/xprtsock.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>