Loading src/common/di_ops.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,3 +28,4 @@ int tor_memeq(const void *a, const void *b, size_t sz); #define fast_memneq(a,b,c) (0!=memcmp((a),(b),(c))) #endif src/or/dirvote.c +6 −4 Original line number Diff line number Diff line Loading @@ -314,7 +314,8 @@ compare_vote_rs(const vote_routerstatus_t *a, const vote_routerstatus_t *b) if ((r = fast_memcmp(a->status.identity_digest, b->status.identity_digest, DIGEST_LEN))) return r; if ((r = fast_memcmp(a->status.descriptor_digest, b->status.descriptor_digest, if ((r = fast_memcmp(a->status.descriptor_digest, b->status.descriptor_digest, DIGEST_LEN))) return r; if ((r = (int)(b->status.published_on - a->status.published_on))) Loading Loading @@ -823,7 +824,8 @@ networkstatus_compute_consensus(smartlist_t *votes, if (index[v_sl_idx] < size[v_sl_idx]) { rs = smartlist_get(v->routerstatus_list, index[v_sl_idx]); if (!lowest_id || fast_memcmp(rs->status.identity_digest, lowest_id, DIGEST_LEN) < 0) fast_memcmp(rs->status.identity_digest, lowest_id, DIGEST_LEN) < 0) lowest_id = rs->status.identity_digest; } }); Loading src/or/networkstatus.c +3 −2 Original line number Diff line number Diff line Loading @@ -1433,7 +1433,8 @@ networkstatus_set_current_consensus(const char *consensus, unsigned flags) } if (current_consensus && tor_memeq(c->networkstatus_digest, current_consensus->networkstatus_digest, tor_memeq(c->networkstatus_digest, current_consensus->networkstatus_digest, DIGEST_LEN)) { /* We already have this one. That's a failure. */ log_info(LD_DIR, "Got a consensus we already have"); Loading src/or/routerlist.c +5 −4 Original line number Diff line number Diff line Loading @@ -2008,8 +2008,8 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed) if (n_matches <= 1 || router->is_running) best_match = router; } else if (maybedigest && tor_memeq(digest, router->cache_info.identity_digest, DIGEST_LEN) ) { tor_memeq(digest, router->cache_info.identity_digest, DIGEST_LEN)) { if (router_hex_digest_matches(router, nickname)) return router; /* If we reach this point, we have a ID=name syntax that matches the Loading Loading @@ -4665,7 +4665,8 @@ routerinfo_incompatible_with_extrainfo(routerinfo_t *ri, extrainfo_t *ei, /* The identity must match exactly to have been generated at the same time * by the same router. */ if (tor_memneq(ri->cache_info.identity_digest, ei->cache_info.identity_digest, if (tor_memneq(ri->cache_info.identity_digest, ei->cache_info.identity_digest, DIGEST_LEN)) { if (msg) *msg = "Extrainfo nickname or identity did not match routerinfo"; goto err; /* different servers */ Loading src/common/container.h +1 −1 File changed.Contains only whitespace changes. Show changes Loading
src/common/di_ops.h +1 −0 Original line number Diff line number Diff line Loading @@ -28,3 +28,4 @@ int tor_memeq(const void *a, const void *b, size_t sz); #define fast_memneq(a,b,c) (0!=memcmp((a),(b),(c))) #endif
src/or/dirvote.c +6 −4 Original line number Diff line number Diff line Loading @@ -314,7 +314,8 @@ compare_vote_rs(const vote_routerstatus_t *a, const vote_routerstatus_t *b) if ((r = fast_memcmp(a->status.identity_digest, b->status.identity_digest, DIGEST_LEN))) return r; if ((r = fast_memcmp(a->status.descriptor_digest, b->status.descriptor_digest, if ((r = fast_memcmp(a->status.descriptor_digest, b->status.descriptor_digest, DIGEST_LEN))) return r; if ((r = (int)(b->status.published_on - a->status.published_on))) Loading Loading @@ -823,7 +824,8 @@ networkstatus_compute_consensus(smartlist_t *votes, if (index[v_sl_idx] < size[v_sl_idx]) { rs = smartlist_get(v->routerstatus_list, index[v_sl_idx]); if (!lowest_id || fast_memcmp(rs->status.identity_digest, lowest_id, DIGEST_LEN) < 0) fast_memcmp(rs->status.identity_digest, lowest_id, DIGEST_LEN) < 0) lowest_id = rs->status.identity_digest; } }); Loading
src/or/networkstatus.c +3 −2 Original line number Diff line number Diff line Loading @@ -1433,7 +1433,8 @@ networkstatus_set_current_consensus(const char *consensus, unsigned flags) } if (current_consensus && tor_memeq(c->networkstatus_digest, current_consensus->networkstatus_digest, tor_memeq(c->networkstatus_digest, current_consensus->networkstatus_digest, DIGEST_LEN)) { /* We already have this one. That's a failure. */ log_info(LD_DIR, "Got a consensus we already have"); Loading
src/or/routerlist.c +5 −4 Original line number Diff line number Diff line Loading @@ -2008,8 +2008,8 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed) if (n_matches <= 1 || router->is_running) best_match = router; } else if (maybedigest && tor_memeq(digest, router->cache_info.identity_digest, DIGEST_LEN) ) { tor_memeq(digest, router->cache_info.identity_digest, DIGEST_LEN)) { if (router_hex_digest_matches(router, nickname)) return router; /* If we reach this point, we have a ID=name syntax that matches the Loading Loading @@ -4665,7 +4665,8 @@ routerinfo_incompatible_with_extrainfo(routerinfo_t *ri, extrainfo_t *ei, /* The identity must match exactly to have been generated at the same time * by the same router. */ if (tor_memneq(ri->cache_info.identity_digest, ei->cache_info.identity_digest, if (tor_memneq(ri->cache_info.identity_digest, ei->cache_info.identity_digest, DIGEST_LEN)) { if (msg) *msg = "Extrainfo nickname or identity did not match routerinfo"; goto err; /* different servers */ Loading