diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-01 20:50:11 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-01 20:50:11 +0000 |
commit | ce72a9914e5e996f3c47cc9ec368309e0f1c861e (patch) | |
tree | 785572be5289ef84e5f846007a62713494d4ea68 /src/or/or.h | |
parent | 7ed921708f94b23653a65173a5b61ddeff6e9125 (diff) | |
download | tor-ce72a9914e5e996f3c47cc9ec368309e0f1c861e.tar tor-ce72a9914e5e996f3c47cc9ec368309e0f1c861e.tar.gz |
r8822@totoro: nickm | 2006-10-01 16:24:22 -0400
Fix bug 303: reject attempts to use Tor as a one-hop proxy.
svn:r8566
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h index 0cce2b592..f434f5309 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1232,8 +1232,6 @@ typedef struct origin_circuit_t { * for this circuit. This includes ciphers for each hop, * integrity-checking digests for each hop, and package/delivery * windows for each hop. - * - * The cpath field is defined only when we are the circuit's origin. */ crypt_path_t *cpath; @@ -1307,10 +1305,15 @@ typedef struct or_circuit_t { /** A hash of location-hidden service's PK if purpose is INTRO_POINT, or a * rendezvous cookie if purpose is REND_POINT_WAITING. Filled with zeroes * otherwise. + * ???? move to a subtype or adjunct structure? Wastes 20 bytes. -NM */ char rend_token[REND_TOKEN_LEN]; + /* ???? move to a subtype or adjunct structure? Wastes 20 bytes -NM */ char handshake_digest[DIGEST_LEN]; /**< Stores KH for the handshake. */ + + /** True iff this circuit was made with a CREATE_FAST cell. */ + unsigned int is_first_hop : 1; } or_circuit_t; /** Convert a circuit subtype to a circuit_t.*/ @@ -1751,6 +1754,7 @@ void circuit_mark_all_unused_circs(void); void circuit_expire_all_dirty_circs(void); void _circuit_mark_for_close(circuit_t *circ, int reason, int line, const char *file); +int circuit_get_cpath_len(origin_circuit_t *circ); #define circuit_mark_for_close(c, reason) \ _circuit_mark_for_close((c), (reason), __LINE__, _SHORT_FILE_) |