summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-07-24 13:44:04 +0000
committerNick Mathewson <nickm@torproject.org>2008-07-24 13:44:04 +0000
commit3ce6e2fba290eb5d3a4d0a3ca2f61658245b52b6 (patch)
tree08c562380df129cb4c8c896eecba0f3d8013d262 /src/or/router.c
parented781e69716248111ef1a2ddc1b9add671bd8d16 (diff)
downloadtor-3ce6e2fba290eb5d3a4d0a3ca2f61658245b52b6.tar.gz
tor-3ce6e2fba290eb5d3a4d0a3ca2f61658245b52b6.zip
r17346@aud-055: nickm | 2008-07-24 15:37:19 +0200
Make generic address manipulation functions work better. Switch address policy code to use tor_addr_t, so it can handle IPv6. That is a good place to start. svn:r16178
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 4cd02370af..bd8cb8351e 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1252,7 +1252,7 @@ router_rebuild_descriptor(int force)
ri = tor_malloc_zero(sizeof(routerinfo_t));
ri->cache_info.routerlist_index = -1;
- ri->address = tor_dup_addr(addr);
+ ri->address = tor_dup_ip(addr);
ri->nickname = tor_strdup(options->Nickname);
ri->addr = addr;
ri->or_port = options->ORPort;
@@ -1728,7 +1728,7 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router,
int i;
for (i = 0; i < smartlist_len(router->exit_policy); ++i) {
tmpe = smartlist_get(router->exit_policy, i);
- result = policy_write_item(s+written, maxlen-written, tmpe);
+ result = policy_write_item(s+written, maxlen-written, tmpe, 1);
if (result < 0) {
log_warn(LD_BUG,"descriptor policy_write_item ran out of room!");
return -1;