[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #5528 [Tor Client]: router->address is redundant with router->addr
#5528: router->address is redundant with router->addr
-------------------------+--------------------------------------------------
Reporter: arma | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Tor: 0.2.4.x-final
Component: Tor Client | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
It used to be more, but these days address is always an IP address, and I
believe it always matches router->addr.
So it's only around to save us the trouble of making a string out of
ri->addr when we want one. Maybe that's not worth it anymore.
Here are the places where it's set:
In router_parse_entry_from_string():
{{{
router->address = tor_strdup(tok->args[1]);
if (!tor_inet_aton(router->address, &in)) {
log_warn(LD_DIR,"Router address is not an IP address.");
goto err;
}
router->addr = ntohl(in.s_addr);
}}}
In rewrite_node_address_for_bridge():
{{{
ri->addr = tor_addr_to_ipv4h(&bridge->addr);
tor_free(ri->address);
ri->address = tor_dup_ip(ri->addr);
}}}
In router_rebuild_descriptor():
{{{
ri->address = tor_dup_ip(addr);
ri->nickname = tor_strdup(options->Nickname);
ri->addr = addr;
}}}
I think these three might be all the places.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5528>
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