From 1243f1c034af37079501c5d546a613c406bc32d5 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Tue, 20 Nov 2012 15:00:15 -0600 Subject: [PATCH] ubik: Do not count votes from error'd connections If the given connection has a connection-wide error on it, the vote we got from that site is probably not valid, and we could easily be interpreting an error code as a vote time. So instead, treat the host as if we got a network error from it. Reviewed-on: http://gerrit.openafs.org/8487 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 23092acce5d2d71a5ad6402119973c7c2c2f5e89) Change-Id: Id320b33bb6662d7867ae1f4a8d0a29808f16b59d Reviewed-on: http://gerrit.openafs.org/8947 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Stephan Wiesand --- src/ubik/beacon.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ubik/beacon.c b/src/ubik/beacon.c index 4446ccc6ca..192b20670f 100644 --- a/src/ubik/beacon.c +++ b/src/ubik/beacon.c @@ -443,6 +443,12 @@ ubeacon_Interact(void *dummy) (int)code, afs_inet_ntoa_r(ts->addr[0], hoststr)); code = -1; } + if (code > 0 && rx_ConnError(connections[multi_i])) { + ubik_print("assuming vote from %s is invalid due to conn error %d; marking host down\n", + afs_inet_ntoa_r(ts->addr[0], hoststr), + (int)rx_ConnError(connections[multi_i])); + code = -1; + } /* note that the vote time (the return code) represents the time * the vote was computed, *not* the time the vote expires. We compute