aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-25 09:30:13 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-20 11:58:46 -0700
commitaf53bc4db606a4ce179a4cef0f1d2a64276b08bc (patch)
tree6acee28ce06bf17ac07e0f0b9fa90cfade952707 /net
parent5c7a854c966cc6370ab2d4595f7cee5dd02d87c1 (diff)
libceph: clear messenger auth_retry flag when we authenticate
commit 20e55c4cc758e4dccdfd92ae8e9588dd624b2cd7 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 ba1037ceb49..7f703ae081c 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1542,7 +1542,6 @@ static int process_connect(struct ceph_connection *con)
con->error_msg = "connect authorization failure";
return -1;
}
- con->auth_retry = 1;
con_out_kvec_reset(con);
ret = prepare_write_connect(con);
if (ret < 0)
@@ -1627,7 +1626,7 @@ static int process_connect(struct ceph_connection *con)
WARN_ON(con->state != CON_STATE_NEGOTIATING);
con->state = CON_STATE_OPEN;
-
+ con->auth_retry = 0; /* we authenticated; clear flag */
con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq);
con->connect_seq++;
con->peer_features = server_feat;