From: Nick Mathewson Date: Thu, 19 Apr 2012 02:30:02 +0000 (-0400) Subject: Merge remote-tracking branch 'origin/maint-0.2.2' X-Git-Tag: tor-0.2.3.14-alpha~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9dae1ff2e147d2b74fb1ce2836fb9c42f227af4;p=thirdparty%2Ftor.git Merge remote-tracking branch 'origin/maint-0.2.2' Conflicts: src/or/rendservice.c Conflicts were due to new NON_ANONYMOUS_MODE_ENABLED tor2web code; I think I resolved them correctly. --- e9dae1ff2e147d2b74fb1ce2836fb9c42f227af4 diff --cc src/or/rendservice.c index 30b0d88af6,a1daa8a550..44e6697018 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@@ -1062,11 -907,15 +1062,18 @@@ rend_service_introduce(origin_circuit_ time_t now = time(NULL); char diffie_hellman_hash[DIGEST_LEN]; time_t *access_time; - or_options_t *options = get_options(); + const or_options_t *options = get_options(); + if (circuit->_base.purpose != CIRCUIT_PURPOSE_S_INTRO) { + log_warn(LD_PROTOCOL, + "Got an INTRODUCE2 over a non-introduction circuit %d.", + circuit->_base.n_circ_id); + return -1; + } + +#ifndef NON_ANONYMOUS_MODE_ENABLED + tor_assert(!(circuit->build_state->onehop_tunnel)); +#endif tor_assert(circuit->rend_data); base32_encode(serviceid, REND_SERVICE_ID_LEN_BASE32+1,