aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-25 12:30:13 -0400
committerSage Weil <sage@inktank.com>2013-05-02 00:17:11 -0400
commit20e55c4cc758e4dccdfd92ae8e9588dd624b2cd7 (patch)
tree8e8392734f7553ecf4083703d30c27249d50c0b9 /net
parent3a23083bda56850a1dc0e1c6d270b1f5dc789f07 (diff)
libceph: clear messenger auth_retry flag when we authenticate
We maintain a counter of failed auth attempts to allow us to retry once before failing. However, if the second attempt succeeds, the flag isn't cleared, which makes us think auth failed again later when the connection resets for other reasons (like a socket error). This is one part of the sorry sequence of events in bug http://tracker.ceph.com/issues/4282 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com>
Diffstat (limited to 'net')
-rw-r--r--net/ceph/messenger.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index e8491db43f5e..2aecc4896a03 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -2013,7 +2013,6 @@ static int process_connect(struct ceph_connection *con)
2013 con->error_msg = "connect authorization failure"; 2013 con->error_msg = "connect authorization failure";
2014 return -1; 2014 return -1;
2015 } 2015 }
2016 con->auth_retry = 1;
2017 con_out_kvec_reset(con); 2016 con_out_kvec_reset(con);
2018 ret = prepare_write_connect(con); 2017 ret = prepare_write_connect(con);
2019 if (ret < 0) 2018 if (ret < 0)
@@ -2099,7 +2098,7 @@ static int process_connect(struct ceph_connection *con)
2099 2098
2100 WARN_ON(con->state != CON_STATE_NEGOTIATING); 2099 WARN_ON(con->state != CON_STATE_NEGOTIATING);
2101 con->state = CON_STATE_OPEN; 2100 con->state = CON_STATE_OPEN;
2102 2101 con->auth_retry = 0; /* we authenticated; clear flag */
2103 con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq); 2102 con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq);
2104 con->connect_seq++; 2103 con->connect_seq++;
2105 con->peer_features = server_feat; 2104 con->peer_features = server_feat;