From 3af59dcaee4e5ef147dc263dc9f5bf0e5cc72aad Mon Sep 17 00:00:00 2001 From: Robert Ransom Date: Tue, 15 Mar 2011 09:13:25 -0700 Subject: [PATCH 1/2] Log the source of a rejected POSTed v3 vote Related to ticket 2683. --- changes/bug2683a | 3 +++ src/or/directory.c | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 changes/bug2683a diff --git a/changes/bug2683a b/changes/bug2683a new file mode 100644 index 0000000000..2fe308b030 --- /dev/null +++ b/changes/bug2683a @@ -0,0 +1,3 @@ + o Minor features + - Log the source of a rejected POSTed v3 networkstatus vote. + diff --git a/src/or/directory.c b/src/or/directory.c index f8d587f35c..00de1f2f80 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -3259,6 +3259,8 @@ directory_handle_command_post(dir_connection_t *conn, const char *headers, write_http_status_line(conn, status, "Vote stored"); } else { tor_assert(msg); + log_warn(LD_DIRSERV, "Rejected vote from %s (\"%s\").", + conn->_base.address, msg); write_http_status_line(conn, status, msg); } goto done; From 98abe1420d21cf67931229fb776117927c7ab1d6 Mon Sep 17 00:00:00 2001 From: Robert Ransom Date: Tue, 15 Mar 2011 09:48:26 -0700 Subject: [PATCH 2/2] Fix a log message typo --- changes/log-typo-2011-03-15-01 | 3 +++ src/or/routerparse.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changes/log-typo-2011-03-15-01 diff --git a/changes/log-typo-2011-03-15-01 b/changes/log-typo-2011-03-15-01 new file mode 100644 index 0000000000..3830df388f --- /dev/null +++ b/changes/log-typo-2011-03-15-01 @@ -0,0 +1,3 @@ + o Minor bugfixes + - Fix a minor typo in a log message. Bugfix on 0.2.2.6-alpha. + diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 28ce97ebde..e0605dcd4d 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -2822,7 +2822,7 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out, ns->flavor = flav = flavor; } if (flav != FLAV_NS && ns_type != NS_TYPE_CONSENSUS) { - log_warn(LD_DIR, "Flavor found on non-consenus networkstatus."); + log_warn(LD_DIR, "Flavor found on non-consensus networkstatus."); goto err; }