[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #1859 [Tor Client]: Using 'mytorexitnode.exit' request when mytorexitnode is both exit and client
#1859: Using 'mytorexitnode.exit' request when mytorexitnode is both exit and
client
------------------------+---------------------------------------------------
Reporter: mwenge | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor Client | Version: Tor: 0.2.2.12-alpha
Keywords: | Parent:
------------------------+---------------------------------------------------
Comment(by Sebastian):
So here's my idea for a patch. I'm not sure if that can break in other
cases, but it fixes the problem.
{{{
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 8808f56..f8b2b65 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2408,12 +2408,16 @@ router_get_by_hexdigest(const char *hexdigest)
routerinfo_t *
router_get_by_digest(const char *digest)
{
+ routerinfo_t * res = router_get_my_routerinfo();
+
tor_assert(digest);
if (!routerlist) return NULL;
// routerlist_assert_ok(routerlist);
+ if (res && !memcmp(res->cache_info.identity_digest, digest,
DIGEST_LEN))
+ return res;
return rimap_get(routerlist->identity_map, digest);
}
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/1859#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs