extend-data cells can be extend requests.
- Code cleanup
- - fix router_get_by_* functions so they can get ourselves too,
- and audit everything to make sure rend and intro points are
+ o fix router_get_by_* functions so they can get ourselves too ...
+ - and audit everything to make sure rend and intro points are
just as likely to be us as not.
- tor should be able to have a pool of outgoing IP addresses
return NULL;
if (nickname[0] == '$')
return router_get_by_hexdigest(nickname);
+ if (server_mode(get_options()) &&
+ !strcasecmp(nickname, get_options()->Nickname))
+ return router_get_my_routerinfo();
maybedigest = (strlen(nickname) == HEX_DIGEST_LEN) &&
(base16_decode(digest,DIGEST_LEN,nickname,HEX_DIGEST_LEN) == 0);
tor_assert(digest);
if (!routerlist) return NULL;
+ if (server_mode(get_options()) &&
+ (router = router_get_my_routerinfo()) &&
+ !memcmp(digest, router->identity_digest, DIGEST_LEN))
+ return router;
for (i=0;i<smartlist_len(routerlist->routers);i++) {
router = smartlist_get(routerlist->routers, i);