summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@ev0ke.net>2015-01-28 10:52:14 -0500
committerDavid Goulet <dgoulet@ev0ke.net>2015-02-06 16:06:20 -0500
commitb101f4e98ce811aee729c31f62ec5dd1cfe44e85 (patch)
tree2b3f773f863e71ec558091c6ddd66303a03158a1 /src/or
parente36faeec1d40e1f4f7ae54c798ad4492f86f594c (diff)
downloadtor-b101f4e98ce811aee729c31f62ec5dd1cfe44e85.tar.gz
tor-b101f4e98ce811aee729c31f62ec5dd1cfe44e85.zip
Control: getinfo entry-guards report down-since
If the guard unreachable_since variable was set, the status "up" was reported which is wrong. This adds the "down" status followed by the unreachable_since time value. Fixes #14184 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/or')
-rw-r--r--src/or/entrynodes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index 17cb825de3..5a12170b0c 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -1666,6 +1666,9 @@ getinfo_helper_entry_guards(control_connection_t *conn,
} else if (e->bad_since) {
when = e->bad_since;
status = "unusable";
+ } else if (e->unreachable_since) {
+ when = e->unreachable_since;
+ status = "down";
} else {
status = "up";
}