[or-cvs] various bugfixes and updates
Nick Mathewson
nickm at freehaven.net
Thu Sep 25 14:56:58 UTC 2003
On Thu, 2003-09-25 at 06:42, Roger Dingledine wrote:
[...]
> static int init_descriptor(void) {
> routerinfo_t *ri;
> + char localhostname[256];
> +
> + if(gethostname(localhostname,sizeof(localhostname)) < 0) {
> + log_fn(LOG_ERR,"Error obtaining local hostname");
> + return -1;
> + }
> ri = tor_malloc(sizeof(routerinfo_t));
> - ri->address = strdup("XXXXXXX"); /*XXX*/
> + ri->address = strdup(localhostname);
This won't work in the real world. You need a way for users to specify
their own hostnames for two reasons:
1) So you can have an OR running on tor.freehaven.net, not
moria.mit.edu.
2) So people behind proxies can stick an OR on outer.foo.com, not
inner.foo.com.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20030925/92a0ee91/attachment.pgp>
More information about the tor-dev
mailing list