Browse Source

Merge branch 'debian-merge' into debian

* debian-merge:
  New upstream version
  finishing touches on the changelog
  bump to 0.2.2.3-alpha, plus add a changelog for bug 1103
  Be more robust to bad circwindow values
  Fix Bug 1103.
  Bump version to 0.2.2.2-alpha-dev
Peter Palfrader 16 years ago
parent
commit
c7d0711df2
8 changed files with 33 additions and 9 deletions
  1. 11 0
      ChangeLog
  2. 1 1
      configure.in
  3. 1 1
      contrib/tor-mingw.nsi.in
  4. 6 0
      debian/changelog
  5. 2 0
      src/or/circuitbuild.c
  6. 5 4
      src/or/circuitlist.c
  7. 6 2
      src/or/networkstatus.c
  8. 1 1
      src/win32/orconfig.h

+ 11 - 0
ChangeLog

@@ -1,3 +1,14 @@
+Changes in version 0.2.2.3-alpha - 2009-09-23
+  o Major bugfixes:
+    - Fix an overzealous assert in our new circuit build timeout code.
+      Bugfix on 0.2.2.2-alpha; fixes bug 1103.
+
+  o Minor bugfixes:
+    - If the networkstatus consensus tells us that we should use a
+      negative circuit package window, ignore it. Otherwise we'll
+      believe it and then trigger an assert. Bugfix on 0.2.2.2-alpha.
+
+
 Changes in version 0.2.2.2-alpha - 2009-09-21
   o Major features:
     - Tor now tracks how long it takes to build client-side circuits

+ 1 - 1
configure.in

@@ -4,7 +4,7 @@ dnl Copyright (c) 2007-2008, The Tor Project, Inc.
 dnl See LICENSE for licensing information
 
 AC_INIT
-AM_INIT_AUTOMAKE(tor, 0.2.2.2-alpha)
+AM_INIT_AUTOMAKE(tor, 0.2.2.3-alpha)
 AM_CONFIG_HEADER(orconfig.h)
 
 AC_CANONICAL_HOST

+ 1 - 1
contrib/tor-mingw.nsi.in

@@ -9,7 +9,7 @@
 !include "FileFunc.nsh"
 !insertmacro GetParameters
   
-!define VERSION "0.2.2.2-alpha"
+!define VERSION "0.2.2.3-alpha"
 !define INSTALLER "tor-${VERSION}-win32.exe"
 !define WEBSITE "https://www.torproject.org/"
 !define LICENSE "LICENSE"

+ 6 - 0
debian/changelog

@@ -1,3 +1,9 @@
+tor (0.2.2.3-alpha-1) experimental; urgency=low
+
+  * New upstream version.
+
+ -- Peter Palfrader <weasel@debian.org>  Wed, 23 Sep 2009 10:27:40 +0200
+
 tor (0.2.2.2-alpha-1) experimental; urgency=low
 
   * New upstream version.

+ 2 - 0
src/or/circuitbuild.c

@@ -643,6 +643,8 @@ circuit_build_times_count_pretimeouts(circuit_build_times_t *cbt)
     double timeout_quantile = 1.0-
           ((double)cbt->pre_timeouts)/
                     (cbt->pre_timeouts+cbt->total_build_times);
+    /* Make sure it doesn't exceed the synthetic max */
+    timeout_quantile *= MAX_SYNTHETIC_QUANTILE;
     cbt->Xm = circuit_build_times_mode(cbt);
     tor_assert(cbt->Xm > 0);
     /* Use current timeout to get an estimate on alpha */

+ 5 - 4
src/or/circuitlist.c

@@ -367,10 +367,11 @@ circuit_purpose_to_controller_string(uint8_t purpose)
 int32_t
 circuit_initial_package_window(void)
 {
-  networkstatus_t *consensus = networkstatus_get_latest_consensus();
-  if (consensus)
-    return networkstatus_get_param(consensus, "circwindow", CIRCWINDOW_START);
-  return CIRCWINDOW_START;
+  int32_t num = networkstatus_get_param(NULL, "circwindow", CIRCWINDOW_START);
+  /* If the consensus tells us a negative number, we'd assert. */
+  if (num < 0)
+    num = CIRCWINDOW_START;
+  return num;
 }
 
 /** Initialize the common elements in a circuit_t, and add it to the global

+ 6 - 2
src/or/networkstatus.c

@@ -1894,14 +1894,18 @@ networkstatus_dump_bridge_status_to_file(time_t now)
 }
 
 /** Return the value of a integer parameter from the networkstatus <b>ns</b>
- * whose name is <b>param_name</b>.  Return <b>default_val</b> if ns is NULL,
- * or if it has no parameter called <b>param_name</b>. */
+ * whose name is <b>param_name</b>.  If <b>ns</b> is NULL, try loading the
+ * latest consensus ourselves. Return <b>default_val</b> if no latest
+ * consensus, or if it has no parameter called <b>param_name</b>. */
 int32_t
 networkstatus_get_param(networkstatus_t *ns, const char *param_name,
                         int32_t default_val)
 {
   size_t name_len;
 
+  if (!ns) /* if they pass in null, go find it ourselves */
+    ns = networkstatus_get_latest_consensus();
+
   if (!ns || !ns->net_params)
     return default_val;
 

+ 1 - 1
src/win32/orconfig.h

@@ -226,5 +226,5 @@
 #define USING_TWOS_COMPLEMENT
 
 /* Version number of package */
-#define VERSION "0.2.2.2-alpha"
+#define VERSION "0.2.2.3-alpha"