diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-11-08 16:51:30 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-11-30 11:55:44 -0500 |
commit | 11d5a9f63d85adda25d1227befcebf249107a1bd (patch) | |
tree | 65d5ef90fbfe27b421be49053574ddb5e26ee51e /src/test/test_dir.c | |
parent | 5f0a8dcd2cfcbafc3deb3a6717808b607a459dac (diff) | |
download | tor-11d5a9f63d85adda25d1227befcebf249107a1bd.tar.gz tor-11d5a9f63d85adda25d1227befcebf249107a1bd.zip |
Initial support for simplest use of prop186 or-address lines
This lets a routerinfo_t have a single IPv6 or-address, and adds
support for formatting and parsing those lines.
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r-- | src/test/test_dir.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 5b7ce5cabe..046a1f25b5 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -96,6 +96,8 @@ test_dir_formats(void) r1->cache_info.published_on = 0; r1->or_port = 9000; r1->dir_port = 9003; + tor_addr_parse(&r1->ipv6_addr, "1:2:3:4::"); + r1->ipv6_orport = 9999; r1->onion_pkey = crypto_pk_dup_key(pk1); r1->identity_pkey = crypto_pk_dup_key(pk2); r1->bandwidthrate = 1000; @@ -141,6 +143,7 @@ test_dir_formats(void) test_assert(router_dump_router_to_string(buf, 2048, r1, pk2)>0); strlcpy(buf2, "router Magri 18.244.0.1 9000 0 9003\n" + "or-address [1:2:3:4::]:9999\n" "platform Tor "VERSION" on ", sizeof(buf2)); strlcat(buf2, get_uname(), sizeof(buf2)); strlcat(buf2, "\n" |