{
origin_circuit_t *circ;
int onehop_tunnel = (flags & CIRCLAUNCH_ONEHOP_TUNNEL) != 0;
+ int have_path = have_enough_path_info(! (flags & CIRCLAUNCH_IS_INTERNAL) );
+ int need_specific_rp = 0;
- if (!onehop_tunnel && !router_have_minimum_dir_info()) {
- log_debug(LD_CIRC,"Haven't fetched enough directory info yet; canceling "
- "circuit launch.");
+ if (!onehop_tunnel && (!router_have_minimum_dir_info() || !have_path)) {
+ log_debug(LD_CIRC,"Haven't %s yet; canceling "
+ "circuit launch.",
+ !router_have_minimum_dir_info() ?
+ "fetched enough directory info" :
+ "received a consensus with exits");
return NULL;
}
PLURAL(AuthDirBadExitCC),
PLURAL(AuthDirInvalidCC),
PLURAL(AuthDirRejectCC),
- PLURAL(ExitNode),
PLURAL(EntryNode),
PLURAL(ExcludeNode),
+ PLURAL(Tor2webRendezvousPoint),
PLURAL(FirewallPort),
PLURAL(LongLivedPort),
PLURAL(HiddenServiceNode),
OBSOLETE("StrictEntryNodes"),
OBSOLETE("StrictExitNodes"),
V(StrictNodes, BOOL, "0"),
- V(Support022HiddenServices, AUTOBOOL, "auto"),
- OBSOLETE("SysLog"),
+ OBSOLETE("Support022HiddenServices"),
V(TestSocks, BOOL, "0"),
- OBSOLETE("TestVia"),
V(TokenBucketRefillInterval, MSEC_INTERVAL, "100 msec"),
V(Tor2webMode, BOOL, "0"),
+ V(Tor2webRendezvousPoints, ROUTERSET, NULL),
V(TLSECGroup, STRING, NULL),
V(TrackHostExits, CSV, NULL),
V(TrackHostExitsExpire, INTERVAL, "30 minutes"),
src/test/test_relaycell.c \
src/test/test_replay.c \
src/test/test_routerkeys.c \
+ src/test/test_routerlist.c \
+ src/test/test_routerset.c \
+ src/test/test_scheduler.c \
src/test/test_socks.c \
- src/test/test_util.c \
- src/test/test_config.c \
- src/test/test_hs.c \
- src/test/test_nodelist.c \
- src/test/test_policy.c \
src/test/test_status.c \
- src/test/test_routerset.c \
+ src/test/test_threads.c \
+ src/test/test_util.c \
+ src/test/testing_common.c \
+ src/test/testhelper.c \
src/ext/tinytest.c
+src_test_test_slow_SOURCES = \
+ src/test/test_slow.c \
+ src/test/test_crypto_slow.c \
+ src/test/test_util_slow.c \
+ src/test/testing_common.c \
+ src/ext/tinytest.c
+
+
src_test_test_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
src_test_test_CPPFLAGS= $(src_test_AM_CPPFLAGS)
@TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@
noinst_HEADERS+= \
+ src/test/fakechans.h \
src/test/test.h \
- src/test/ed25519_vectors.inc
+ src/test/testhelper.h \
+ src/test/test_descriptors.inc \
+ src/test/example_extrainfo.inc \
+ src/test/failing_routerdescs.inc \
++ src/test/ed25519_vectors.inc \
+ src/test/test_descriptors.inc
-if CURVE25519_ENABLED
noinst_PROGRAMS+= src/test/test-ntor-cl
src_test_test_ntor_cl_SOURCES = src/test/test_ntor_cl.c
src_test_test_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@
/* Walk the nodelist and add all nodes as entry guards. */
our_nodelist = nodelist_get_list();
- tt_int_op(smartlist_len(our_nodelist), OP_EQ, NUMBER_OF_DESCRIPTORS);
- tt_int_op(smartlist_len(our_nodelist), ==, HELPER_NUMBER_OF_DESCRIPTORS);
++ tt_int_op(smartlist_len(our_nodelist), OP_EQ, HELPER_NUMBER_OF_DESCRIPTORS);
SMARTLIST_FOREACH_BEGIN(our_nodelist, const node_t *, node) {
const node_t *node_tmp;
} SMARTLIST_FOREACH_END(node);
/* Make sure the nodes were added as entry guards. */
- tt_int_op(smartlist_len(all_entry_guards), OP_EQ, NUMBER_OF_DESCRIPTORS);
- tt_int_op(smartlist_len(all_entry_guards), ==, HELPER_NUMBER_OF_DESCRIPTORS);
++ tt_int_op(smartlist_len(all_entry_guards), OP_EQ, HELPER_NUMBER_OF_DESCRIPTORS);
/* Ensure that all the possible entry guards are enough to satisfy us. */
- tt_int_op(smartlist_len(all_entry_guards), >=, num_needed);
+ tt_int_op(smartlist_len(all_entry_guards), OP_GE, num_needed);
/* Walk the entry guard list for some sanity checking */
SMARTLIST_FOREACH_BEGIN(all_entry_guards, const entry_guard_t *, entry) {
/* Walk the nodelist and add all nodes as entry guards. */
our_nodelist = nodelist_get_list();
- tt_int_op(smartlist_len(our_nodelist), OP_EQ, NUMBER_OF_DESCRIPTORS);
- tt_int_op(smartlist_len(our_nodelist), ==, HELPER_NUMBER_OF_DESCRIPTORS);
++ tt_int_op(smartlist_len(our_nodelist), OP_EQ, HELPER_NUMBER_OF_DESCRIPTORS);
SMARTLIST_FOREACH_BEGIN(our_nodelist, const node_t *, node) {
const node_t *node_tmp;
} SMARTLIST_FOREACH_END(node);
/* Make sure the nodes were added as entry guards. */
- tt_int_op(smartlist_len(all_entry_guards), OP_EQ, NUMBER_OF_DESCRIPTORS);
- tt_int_op(smartlist_len(all_entry_guards), ==, HELPER_NUMBER_OF_DESCRIPTORS);
++ tt_int_op(smartlist_len(all_entry_guards), OP_EQ, HELPER_NUMBER_OF_DESCRIPTORS);
/* Now get a random test entry that we will use for this unit test. */
which_node = 3; /* (chosen by fair dice roll) */