diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-03-27 22:24:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-02 15:38:00 -0400 |
commit | c230ff4ca97ae6bf8ddbf2d19a1a7d33371cde3a (patch) | |
tree | 4e74636d71900d4b3da6b74d0a12281d34017a35 /src/or/relay.h | |
parent | 4fb3ae69a6f81d45843998bd1fb6cecf541ef5b8 (diff) | |
download | tor-c230ff4ca97ae6bf8ddbf2d19a1a7d33371cde3a.tar.gz tor-c230ff4ca97ae6bf8ddbf2d19a1a7d33371cde3a.zip |
Look at all of a RESOLVED cell; not just the first answer.
Also, stop accepting the old kind of RESOLVED cells with no TTL
fields; they haven't been sent since 0.1.1.6-alpha.
This patch won't work without the fix to #10468 -- it will break
DNSPorts unless they set the proper ipv4/6 flags on entry_connection_t.
Diffstat (limited to 'src/or/relay.h')
-rw-r--r-- | src/or/relay.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/relay.h b/src/or/relay.h index 4e1c7f5091..bd5c908579 100644 --- a/src/or/relay.h +++ b/src/or/relay.h @@ -83,6 +83,19 @@ int relay_crypt(circuit_t *circ, cell_t *cell, cell_direction_t cell_direction, #ifdef RELAY_PRIVATE STATIC int connected_cell_parse(const relay_header_t *rh, const cell_t *cell, tor_addr_t *addr_out, int *ttl_out); +/** An address-and-ttl tuple as yielded by resolved_cell_parse */ +typedef struct address_ttl_s { + tor_addr_t addr; + char *hostname; + int ttl; +} address_ttl_t; +STATIC void address_ttl_free(address_ttl_t *addr); +STATIC int resolved_cell_parse(const cell_t *cell, const relay_header_t *rh, + smartlist_t *addresses_out, int *errcode_out); +STATIC void connection_ap_handshake_socks_got_resolve_cell( + entry_connection_t *conn, + int error_code, + smartlist_t *results); STATIC packed_cell_t *packed_cell_new(void); STATIC packed_cell_t *cell_queue_pop(cell_queue_t *queue); STATIC size_t cell_queues_get_total_allocation(void); |