]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'bug12844'
authorNick Mathewson <nickm@torproject.org>
Wed, 11 Feb 2015 20:06:04 +0000 (15:06 -0500)
committerNick Mathewson <nickm@torproject.org>
Wed, 11 Feb 2015 20:06:04 +0000 (15:06 -0500)
Conflicts:
src/or/circuituse.c
src/test/include.am
src/test/test_entrynodes.c

1  2 
doc/tor.1.txt
src/or/circuitbuild.c
src/or/circuitbuild.h
src/or/circuituse.c
src/or/config.c
src/or/or.h
src/or/routerlist.c
src/or/routerlist.h
src/test/include.am
src/test/test_entrynodes.c
src/test/test_hs.c

diff --cc doc/tor.1.txt
Simple merge
Simple merge
Simple merge
index 612b536bad407fa72e603142084dd6b9de3d456a,6304a4dedf78eeb183f218c44f3a7909291d6cdc..c463b0a40fd4856b1e269a4d9ca5cf525c4cd4d7
@@@ -1676,14 -1646,11 +1676,15 @@@ circuit_launch_by_extend_info(uint8_t p
  {
    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;
    }
  
diff --cc src/or/config.c
index de0baa40d95c88916f68fce138906f542f24c70c,999b13446decaf1b88b7b472189108b29fb3ab36..ad4fd458463aeba9666bf9a7076782b975c2b26b
@@@ -78,8 -63,10 +78,9 @@@ static config_abbrev_t option_abbrevs_[
    PLURAL(AuthDirBadExitCC),
    PLURAL(AuthDirInvalidCC),
    PLURAL(AuthDirRejectCC),
 -  PLURAL(ExitNode),
    PLURAL(EntryNode),
    PLURAL(ExcludeNode),
+   PLURAL(Tor2webRendezvousPoint),
    PLURAL(FirewallPort),
    PLURAL(LongLivedPort),
    PLURAL(HiddenServiceNode),
@@@ -400,10 -401,14 +401,11 @@@ static config_var_t option_vars_[] = 
    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"),
diff --cc src/or/or.h
Simple merge
Simple merge
Simple merge
index 595be0b7c2c435ee90764a15a0ba3b96fb6c4eef,28f3a83891d8fb876ede3d40227659881ec18542..71041b123798bf86f669a4bac87b98d066309e1c
@@@ -54,24 -39,17 +54,25 @@@ src_test_test_SOURCES = 
        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)
@@@ -117,13 -74,11 +118,15 @@@ src_test_test_workqueue_LDADD = src/or/
        @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@
index 19071a15508cc29433255ff1bd6f2895fb0d9449,1298159c6948375ce6a9ad209455a60131893064..5f2051c48fe1af20ae19e7c9969b20099eff91ee
@@@ -197,7 -141,7 +141,7 @@@ populate_live_entry_guards_test_helper(
  
    /* 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) {
@@@ -647,7 -590,7 +591,7 @@@ test_entry_is_live(void *arg
  
    /* 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) */
Simple merge