Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b71798c authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Only update the TCP connect cookie on a successful connect

parent 7f260e85
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1511,6 +1511,7 @@ static void xs_tcp_state_change(struct sock *sk)
			transport->tcp_copied = 0;
			transport->tcp_copied = 0;
			transport->tcp_flags =
			transport->tcp_flags =
				TCP_RCV_COPY_FRAGHDR | TCP_RCV_COPY_XID;
				TCP_RCV_COPY_FRAGHDR | TCP_RCV_COPY_XID;
			xprt->connect_cookie++;


			xprt_wake_pending_tasks(xprt, -EAGAIN);
			xprt_wake_pending_tasks(xprt, -EAGAIN);
		}
		}
@@ -2164,7 +2165,6 @@ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
	case 0:
	case 0:
	case -EINPROGRESS:
	case -EINPROGRESS:
		/* SYN_SENT! */
		/* SYN_SENT! */
		xprt->connect_cookie++;
		if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO)
		if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO)
			xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO;
			xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO;
	}
	}