]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge remote-tracking branch 'dgoulet/ticket16943_029_05-squashed'
authorNick Mathewson <nickm@torproject.org>
Fri, 1 Jul 2016 19:29:05 +0000 (15:29 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 1 Jul 2016 19:29:05 +0000 (15:29 -0400)
Trivial Conflicts:
src/or/or.h
src/or/routerparse.c

14 files changed:
1  2 
doc/tor.1.txt
src/common/util.c
src/common/util.h
src/or/config.c
src/or/directory.c
src/or/dirvote.c
src/or/main.c
src/or/networkstatus.c
src/or/networkstatus.h
src/or/or.h
src/or/routerlist.c
src/or/routerlist.h
src/or/routerparse.c
src/test/test_dir.c

diff --cc doc/tor.1.txt
Simple merge
Simple merge
Simple merge
diff --cc src/or/config.c
Simple merge
Simple merge
Simple merge
diff --cc src/or/main.c
Simple merge
index 5415c30289dae3db1903a6d763ebb5a934dd4606,cf395f9c990f45bcbd64e941b3d042a6f67ed367..0dfb8afcce6f1f6023b19db12a4a9f9c2773a8e9
@@@ -1216,56 -1189,10 +1226,56 @@@ consensus_is_waiting_for_certs(void
      ? 1 : 0;
  }
  
 +/** Look up the currently active (depending on bootstrap status) download
 + * status for this consensus flavor and return a pointer to it.
 + */
 +MOCK_IMPL(download_status_t *,
 +networkstatus_get_dl_status_by_flavor,(consensus_flavor_t flavor))
 +{
 +  download_status_t *dl = NULL;
 +  const int we_are_bootstrapping =
 +    networkstatus_consensus_is_bootstrapping(time(NULL));
 +
 +  if ((int)flavor <= N_CONSENSUS_FLAVORS) {
 +    dl = &((we_are_bootstrapping ?
 +           consensus_bootstrap_dl_status : consensus_dl_status)[flavor]);
 +  }
 +
 +  return dl;
 +}
 +
 +/** Look up the bootstrap download status for this consensus flavor
 + * and return a pointer to it. */
 +MOCK_IMPL(download_status_t *,
 +networkstatus_get_dl_status_by_flavor_bootstrap,(consensus_flavor_t flavor))
 +{
 +  download_status_t *dl = NULL;
 +
 +  if ((int)flavor <= N_CONSENSUS_FLAVORS) {
 +    dl = &(consensus_bootstrap_dl_status[flavor]);
 +  }
 +
 +  return dl;
 +}
 +
 +/** Look up the running (non-bootstrap) download status for this consensus
 + * flavor and return a pointer to it. */
 +MOCK_IMPL(download_status_t *,
 +networkstatus_get_dl_status_by_flavor_running,(consensus_flavor_t flavor))
 +{
 +  download_status_t *dl = NULL;
 +
 +  if ((int)flavor <= N_CONSENSUS_FLAVORS) {
 +    dl = &(consensus_dl_status[flavor]);
 +  }
 +
 +  return dl;
 +}
 +
  /** Return the most recent consensus that we have downloaded, or NULL if we
   * don't have one. */
- networkstatus_t *
- networkstatus_get_latest_consensus(void)
+ MOCK_IMPL(networkstatus_t *,
+ networkstatus_get_latest_consensus,(void))
  {
    return current_consensus;
  }
Simple merge
diff --cc src/or/or.h
index a1a0810e4bd2e7ee0dfb8392e0446e828a3c62a7,1b7f1a8568d9a0ee92d6a8049c3edc1de68f152e..ed799b98ff305a9ba7cace601050fdc0a9673626
@@@ -4499,10 -4496,11 +4514,16 @@@ typedef struct 
    /** Autobool: Do we try to retain capabilities if we can? */
    int KeepBindCapabilities;
  
 +  /** Maximum total size of unparseable descriptors to log during the
 +   * lifetime of this Tor process.
 +   */
 +  uint64_t MaxUnparseableDescSizeToLog;
++
+   /** Bool (default: 1): Switch for the shared random protocol. Only
+    * relevant to a directory authority. If off, the authority won't
+    * participate in the protocol. If on (default), a flag is added to the
+    * vote indicating participation. */
+   int AuthDirSharedRandomness;
  } or_options_t;
  
  /** Persistent state for an onion router, as saved to disk. */
Simple merge
Simple merge
index d2579100a5440de5980e7607d6192c7879964d40,88cfbdc4f160f27036991a6695ee0884ad561e2c..0f9b9f75b6a0d61f938834b4d25d3806529fbc04
@@@ -28,7 -28,7 +28,8 @@@
  #include "routerparse.h"
  #include "entrynodes.h"
  #include "torcert.h"
 +#include "sandbox.h"
+ #include "shared_random.h"
  
  #undef log
  #include <math.h>
Simple merge