summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-09-15 19:37:26 -0400
committerNick Mathewson <nickm@torproject.org>2009-09-15 19:37:26 -0400
commited7283d28317fd379f26ea9384eaf91e41bd760a (patch)
tree9b9bfd65071142885a52663d2c312cafa4b31672 /src/or/routerparse.c
parentf9226ae03076fc7d2885e9c84e88613d6dbcf867 (diff)
parent24c740e5fdfa1897b2e8de045d11c419d1e0b5d4 (diff)
downloadtor-ed7283d28317fd379f26ea9384eaf91e41bd760a.tar.gz
tor-ed7283d28317fd379f26ea9384eaf91e41bd760a.zip
Merge commit 'origin/maint-0.2.1'
Resolved conflicts in: src/or/circuitbuild.c
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 815608acee..4f88603c33 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -2638,6 +2638,14 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out,
} else {
if (tok->object_size >= INT_MAX)
goto err;
+ /* We already parsed a vote from this voter. Use the first one. */
+ if (v->signature) {
+ log_fn(LOG_PROTOCOL_WARN, LD_DIR, "We received a networkstatus "
+ "that contains two votes from the same voter. Ignoring "
+ "the second vote.");
+ continue;
+ }
+
v->signature = tor_memdup(tok->object_body, tok->object_size);
v->signature_len = (int) tok->object_size;
}