aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/tcp_connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rds/tcp_connect.c')
-rw-r--r--net/rds/tcp_connect.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/net/rds/tcp_connect.c b/net/rds/tcp_connect.c
index 05f61c533ed3..d6839d96d539 100644
--- a/net/rds/tcp_connect.c
+++ b/net/rds/tcp_connect.c
@@ -60,7 +60,19 @@ void rds_tcp_state_change(struct sock *sk)
60 case TCP_SYN_RECV: 60 case TCP_SYN_RECV:
61 break; 61 break;
62 case TCP_ESTABLISHED: 62 case TCP_ESTABLISHED:
63 rds_connect_path_complete(cp, RDS_CONN_CONNECTING); 63 /* Force the peer to reconnect so that we have the
64 * TCP ports going from <smaller-ip>.<transient> to
65 * <larger-ip>.<RDS_TCP_PORT>. We avoid marking the
66 * RDS connection as RDS_CONN_UP until the reconnect,
67 * to avoid RDS datagram loss.
68 */
69 if (cp->cp_conn->c_laddr > cp->cp_conn->c_faddr &&
70 rds_conn_path_transition(cp, RDS_CONN_CONNECTING,
71 RDS_CONN_ERROR)) {
72 rds_conn_path_drop(cp);
73 } else {
74 rds_connect_path_complete(cp, RDS_CONN_CONNECTING);
75 }
64 break; 76 break;
65 case TCP_CLOSE_WAIT: 77 case TCP_CLOSE_WAIT:
66 case TCP_CLOSE: 78 case TCP_CLOSE: