[tor-commits] [tor-browser-bundle/master] Update and add additional Tor patch backports.

mikeperry at torproject.org mikeperry at torproject.org
Thu Mar 13 04:33:39 UTC 2014


commit f8d4e17956f34936129e47e9865fb4919324e3a6
Author: Mike Perry <mikeperry-git at torproject.org>
Date:   Wed Mar 12 20:53:34 2014 -0700

    Update and add additional Tor patch backports.
---
 Bundle-Data/Docs/ChangeLog.txt            |    2 +
 gitian/descriptors/linux/gitian-tor.yml   |    6 +-
 gitian/descriptors/mac/gitian-tor.yml     |    6 +-
 gitian/descriptors/windows/gitian-tor.yml |    6 +-
 gitian/patches/bug11069.patch             |  164 ++++++++++++++++++-----------
 gitian/patches/bug11156.patch             |  164 +++++++++++++++++++++++++++++
 gitian/patches/bug5018.patch              |   64 ++++++++---
 gitian/patches/bug9229.patch              |   46 ++++++++
 8 files changed, 376 insertions(+), 82 deletions(-)

diff --git a/Bundle-Data/Docs/ChangeLog.txt b/Bundle-Data/Docs/ChangeLog.txt
index ccf31b0..b82ccd7 100644
--- a/Bundle-Data/Docs/ChangeLog.txt
+++ b/Bundle-Data/Docs/ChangeLog.txt
@@ -17,7 +17,9 @@ Tor Browser Bundle 3.6-beta-1 -- Mar 12 2014
    * Update Tor to 0.2.4.21
    * Backport Pending Tor Patches:
      * Bug 5018: Don't launch Pluggable Transport helpers if not in use
+     * Bug 9229: Eliminate 60 second stall during bootstrap with some PTs
      * Bug 11069: Detect and report Pluggable Transport bootstrap failures
+     * Bug 11156: Prevent spurious warning about missing pluggable transports 
    * Bug 10237: Disable the media cache to prevent disk leaks for videos
    * Bug 10703: Force the default charset to avoid locale fingerprinting
    * Bug 10104: Update gitian to fix LXC build issues (for non-KVM/VT builders)
diff --git a/gitian/descriptors/linux/gitian-tor.yml b/gitian/descriptors/linux/gitian-tor.yml
index a83d8a4..f0cb682 100644
--- a/gitian/descriptors/linux/gitian-tor.yml
+++ b/gitian/descriptors/linux/gitian-tor.yml
@@ -26,6 +26,8 @@ files:
 - "versions"
 - "bug10297.patch"
 - "bug5018.patch"
+- "bug9229.patch"
+- "bug11156.patch"
 - "bug11069.patch"
 - "dzip.sh"
 - "openssl.tar.gz"
@@ -82,10 +84,12 @@ script: |
     git am ~/build/bug10297.patch
   fi
   if [ $BUILD_PT_BUNDLES ]; then
-    git am ~/build/bug11069.patch
     if [ ${TOR_TAG::9} == "tor-0.2.4" ];
     then
+      git am ~/build/bug9229.patch
       git am ~/build/bug5018.patch
+      git am ~/build/bug11069.patch
+      git am ~/build/bug11156.patch
     fi
   fi
   mkdir -p $OUTDIR/src
diff --git a/gitian/descriptors/mac/gitian-tor.yml b/gitian/descriptors/mac/gitian-tor.yml
index 1596c8e..8b049b0 100644
--- a/gitian/descriptors/mac/gitian-tor.yml
+++ b/gitian/descriptors/mac/gitian-tor.yml
@@ -27,6 +27,8 @@ files:
 - "openssl.tar.gz"
 - "bug10297.patch"
 - "bug5018.patch"
+- "bug9229.patch"
+- "bug11156.patch"
 - "bug11069.patch"
 - "apple-uni-sdk-10.6_20110407-0.flosoft1_i386.deb"
 - "multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120724.tar.xz"
@@ -98,10 +100,12 @@ script: |
     git am ~/build/bug10297.patch
   fi
   if [ $BUILD_PT_BUNDLES ]; then
-    git am ~/build/bug11069.patch
     if [ ${TOR_TAG::9} == "tor-0.2.4" ];
     then
+      git am ~/build/bug9229.patch
       git am ~/build/bug5018.patch
+      git am ~/build/bug11069.patch
+      git am ~/build/bug11156.patch
     fi
   fi
   mkdir -p $OUTDIR/src
diff --git a/gitian/descriptors/windows/gitian-tor.yml b/gitian/descriptors/windows/gitian-tor.yml
index 9033939..3d05eaa 100644
--- a/gitian/descriptors/windows/gitian-tor.yml
+++ b/gitian/descriptors/windows/gitian-tor.yml
@@ -26,6 +26,8 @@ files:
 - "versions"
 - "bug10297.patch"
 - "bug5018.patch"
+- "bug9229.patch"
+- "bug11156.patch"
 - "bug11069.patch"
 - "binutils.tar.bz2"
 - "dzip.sh"
@@ -94,10 +96,12 @@ script: |
     git am ~/build/bug10297.patch
   fi
   if [ $BUILD_PT_BUNDLES ]; then
-    git am ~/build/bug11069.patch
     if [ ${TOR_TAG::9} == "tor-0.2.4" ];
     then
+      git am ~/build/bug9229.patch
       git am ~/build/bug5018.patch
+      git am ~/build/bug11069.patch
+      git am ~/build/bug11156.patch
     fi  fi
   mkdir -p $OUTDIR/src
   git archive HEAD | tar -x -C $OUTDIR/src
diff --git a/gitian/patches/bug11069.patch b/gitian/patches/bug11069.patch
index 563aafb..b6032e9 100644
--- a/gitian/patches/bug11069.patch
+++ b/gitian/patches/bug11069.patch
@@ -1,16 +1,24 @@
-From 404cc6095e31ce47af9287cdda1e4d3ff449b387 Mon Sep 17 00:00:00 2001
+From 67c70b2566fc9bef4527fb8a0c24ce7d8c4d0647 Mon Sep 17 00:00:00 2001
 From: George Kadianakis <desnacked at riseup.net>
-Date: Fri, 28 Feb 2014 15:19:30 +0000
-Subject: [PATCH] Throw control port warning if we failed connecting to briges.
+Date: Mon, 10 Mar 2014 22:52:07 +0000
+Subject: [PATCH] Throw control port warning if we failed to connect to all our
+ bridges.
 
+Conflicts:
+	src/or/connection.c
+	src/or/control.c
+	src/or/control.h
+	src/test/test_extorport.c
 ---
- changes/bug11069    |  4 ++++
- src/or/connection.c | 41 ++++++++++++++++++++++++++++++++---------
- src/or/connection.h |  2 ++
- src/or/control.c    |  7 ++++---
- src/or/entrynodes.c | 21 ---------------------
- src/or/entrynodes.h |  1 -
- 6 files changed, 42 insertions(+), 34 deletions(-)
+ changes/bug11069       |  4 ++++
+ src/or/connection.c    | 25 +++++++++++++++++++++++++
+ src/or/connection.h    |  2 ++
+ src/or/connection_or.c |  8 +++++---
+ src/or/control.c       | 13 ++++++++-----
+ src/or/control.h       |  3 ++-
+ src/or/entrynodes.c    | 21 ---------------------
+ src/or/entrynodes.h    |  1 -
+ 8 files changed, 46 insertions(+), 31 deletions(-)
  create mode 100644 changes/bug11069
 
 diff --git a/changes/bug11069 b/changes/bug11069
@@ -24,57 +32,27 @@ index 0000000..5aa3085
 +      connect to all of our bridges. Fixes bug 11069; bugfix on
 +      tor-0.2.1.2-alpha.
 diff --git a/src/or/connection.c b/src/or/connection.c
-index 77565ee..12f2b01 100644
+index 4f74a1d..ba28d81 100644
 --- a/src/or/connection.c
 +++ b/src/or/connection.c
-@@ -3129,15 +3129,6 @@ connection_handle_read_impl(connection_t *conn)
-   before = buf_datalen(conn->inbuf);
-   if (connection_read_to_buf(conn, &max_to_read, &socket_error) < 0) {
-     /* There's a read error; kill the connection.*/
--    if (conn->type == CONN_TYPE_OR) {
--      connection_or_notify_error(TO_OR_CONN(conn),
--                                 socket_error != 0 ?
--                                   errno_to_orconn_end_reason(socket_error) :
--                                   END_OR_CONN_REASON_CONNRESET,
--                                 socket_error != 0 ?
--                                   tor_socket_strerror(socket_error) :
--                                   "(unknown, errno was 0)");
--    }
-     if (CONN_IS_EDGE(conn)) {
-       edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
-       connection_edge_end_errno(edge_conn);
-@@ -3152,6 +3143,19 @@ connection_handle_read_impl(connection_t *conn)
-      * connection_or_notify_error() above.
-      */
-     connection_mark_for_close_internal(conn);
-+
-+    /* If it's an OR connection, notify the other components of its
-+       failure. */
-+    if (conn->type == CONN_TYPE_OR) {
-+      connection_or_notify_error(TO_OR_CONN(conn),
-+                                 socket_error != 0 ?
-+                                   errno_to_orconn_end_reason(socket_error) :
-+                                   END_OR_CONN_REASON_CONNRESET,
-+                                 socket_error != 0 ?
-+                                   tor_socket_strerror(socket_error) :
-+                                   "(unknown, errno was 0)");
-+    }
-+
-     return -1;
-   }
-   n_read += buf_datalen(conn->inbuf) - before;
-@@ -4164,6 +4168,25 @@ connection_dir_get_by_purpose_and_resource(int purpose,
+@@ -3846,6 +3846,31 @@ connection_get_by_type_purpose(int type, int purpose)
    return NULL;
  }
  
-+/** Return 1 if there are any active OR connections. We use this to
-+ * guess if we should tell the controller that we didn't manage to
-+ * connect to any of our bridges. */
++/** Return 1 if there are any active OR connections apart from
++ * <b>this_conn</b>.
++ *
++ * We use this to guess if we should tell the controller that we
++ * didn't manage to connect to any of our bridges. */
 +int
-+any_active_or_conns(void)
++any_other_active_or_conns(const or_connection_t *this_conn)
 +{
 +  smartlist_t *conns = get_connection_array();
 +  SMARTLIST_FOREACH_BEGIN(conns, connection_t *, conn) {
++    if (conn == TO_CONN(this_conn)) { /* don't consider this conn */
++      continue;
++    }
++
 +    if (conn->type == CONN_TYPE_OR &&
 +        !conn->marked_for_close) {
 +      log_debug(LD_DIR, "%s: Found an OR connection: %s",
@@ -90,23 +68,71 @@ index 77565ee..12f2b01 100644
  int
  connection_is_listener(connection_t *conn)
 diff --git a/src/or/connection.h b/src/or/connection.h
-index fa07650..47c70c5 100644
+index c78fe6e..9bd5f88 100644
 --- a/src/or/connection.h
 +++ b/src/or/connection.h
-@@ -187,6 +187,8 @@ connection_t *connection_get_by_type_state_rendquery(int type, int state,
+@@ -180,6 +180,8 @@ connection_t *connection_get_by_type_state_rendquery(int type, int state,
  dir_connection_t *connection_dir_get_by_purpose_and_resource(
                                             int state, const char *resource);
  
-+int any_active_or_conns(void);
++int any_other_active_or_conns(const or_connection_t *this_conn);
 +
  #define connection_speaks_cells(conn) ((conn)->type == CONN_TYPE_OR)
  int connection_is_listener(connection_t *conn);
  int connection_state_is_open(connection_t *conn);
+diff --git a/src/or/connection_or.c b/src/or/connection_or.c
+index 8e7cd9e..8684f18 100644
+--- a/src/or/connection_or.c
++++ b/src/or/connection_or.c
+@@ -645,7 +645,8 @@ connection_or_about_to_close(or_connection_t *or_conn)
+                                      reason);
+         if (!authdir_mode_tests_reachability(options))
+           control_event_bootstrap_problem(
+-                orconn_end_reason_to_control_string(reason), reason);
++                orconn_end_reason_to_control_string(reason),
++                reason, or_conn);
+       }
+     }
+   } else if (conn->hold_open_until_flushed) {
+@@ -1008,7 +1009,7 @@ connection_or_connect_failed(or_connection_t *conn,
+ {
+   control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED, reason);
+   if (!authdir_mode_tests_reachability(get_options()))
+-    control_event_bootstrap_problem(msg, reason);
++    control_event_bootstrap_problem(msg, reason, conn);
+ }
+ 
+ /** <b>conn</b> got an error in connection_handle_read_impl() or
+@@ -1638,7 +1639,8 @@ connection_or_client_learned_peer_id(or_connection_t *conn,
+     if (!authdir_mode_tests_reachability(options))
+       control_event_bootstrap_problem(
+                                 "Unexpected identity in router certificate",
+-                                END_OR_CONN_REASON_OR_IDENTITY);
++                                END_OR_CONN_REASON_OR_IDENTITY,
++                                conn);
+     return -1;
+   }
+   if (authdir_mode_tests_reachability(options)) {
 diff --git a/src/or/control.c b/src/or/control.c
-index 05ff9a6..198fb18 100644
+index a88de12..cd2c55c 100644
 --- a/src/or/control.c
 +++ b/src/or/control.c
-@@ -4898,9 +4898,10 @@ control_event_bootstrap_problem, (const char *warn, int reason))
+@@ -4696,10 +4696,12 @@ control_event_bootstrap(bootstrap_status_t status, int progress)
+ 
+ /** Called when Tor has failed to make bootstrapping progress in a way
+  * that indicates a problem. <b>warn</b> gives a hint as to why, and
+- * <b>reason</b> provides an "or_conn_end_reason" tag.
++ * <b>reason</b> provides an "or_conn_end_reason" tag.  <b>or_conn</b>
++ * is the connection that caused this problem.
+  */
+ void
+-control_event_bootstrap_problem(const char *warn, int reason)
++control_event_bootstrap_problem(const char *warn, int reason,
++                                const or_connection_t *or_conn)
+ {
+   int status = bootstrap_percent;
+   const char *tag, *summary;
+@@ -4721,9 +4723,10 @@ control_event_bootstrap_problem(const char *warn, int reason)
    if (reason == END_OR_CONN_REASON_NO_ROUTE)
      recommendation = "warn";
  
@@ -116,15 +142,29 @@ index 05ff9a6..198fb18 100644
 +  /* If we are using bridges and all our OR connections are now
 +     closed, it means that we totally failed to connect to our
 +     bridges. Throw a warning. */
-+  if (get_options()->UseBridges && !any_active_or_conns())
++  if (get_options()->UseBridges && !any_other_active_or_conns(or_conn))
      recommendation = "warn";
  
    if (we_are_hibernating())
+diff --git a/src/or/control.h b/src/or/control.h
+index 61062da..1d90a90 100644
+--- a/src/or/control.h
++++ b/src/or/control.h
+@@ -85,7 +85,8 @@ void enable_control_logging(void);
+ void monitor_owning_controller_process(const char *process_spec);
+ 
+ void control_event_bootstrap(bootstrap_status_t status, int progress);
+-void control_event_bootstrap_problem(const char *warn, int reason);
++void control_event_bootstrap_problem(const char *warn, int reason,
++                                     const or_connection_t *or_conn);
+ 
+ void control_event_clients_seen(const char *controller_str);
+ 
 diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
-index d463303..17c5b13 100644
+index 2aa063c..b145c94 100644
 --- a/src/or/entrynodes.c
 +++ b/src/or/entrynodes.c
-@@ -2213,27 +2213,6 @@ any_bridge_descriptors_known(void)
+@@ -2134,27 +2134,6 @@ any_bridge_descriptors_known(void)
    return choose_random_entry(NULL) != NULL;
  }
  
@@ -153,10 +193,10 @@ index d463303..17c5b13 100644
   * (bridge or member of EntryNodes) and all descriptors we know are
   * down. Else return 0. If <b>act</b> is 1, then mark the down guards
 diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h
-index 772c666..73ac017 100644
+index 52b8dc0..f6c07d9 100644
 --- a/src/or/entrynodes.h
 +++ b/src/or/entrynodes.h
-@@ -105,7 +105,6 @@ void retry_bridge_descriptor_fetch_directly(const char *digest);
+@@ -104,7 +104,6 @@ void retry_bridge_descriptor_fetch_directly(const char *digest);
  void fetch_bridge_descriptors(const or_options_t *options, time_t now);
  void learned_bridge_descriptor(routerinfo_t *ri, int from_cache);
  int any_bridge_descriptors_known(void);
diff --git a/gitian/patches/bug11156.patch b/gitian/patches/bug11156.patch
new file mode 100644
index 0000000..ba6e266
--- /dev/null
+++ b/gitian/patches/bug11156.patch
@@ -0,0 +1,164 @@
+From af42f9b9125fb3f50f7383e63fb02bab1df82db9 Mon Sep 17 00:00:00 2001
+From: George Kadianakis <desnacked at riseup.net>
+Date: Wed, 12 Mar 2014 20:25:05 -0700
+Subject: [PATCH] Don't do directory fetches before all PTs have been
+ configured.
+
+---
+ src/or/microdesc.c     |  2 +-
+ src/or/networkstatus.c | 36 ++++++++++++++++++++++++++++++------
+ src/or/networkstatus.h |  2 +-
+ src/or/nodelist.c      |  8 ++++----
+ src/or/routerlist.c    |  6 +++---
+ 5 files changed, 39 insertions(+), 15 deletions(-)
+
+diff --git a/src/or/microdesc.c b/src/or/microdesc.c
+index 90ac0ac..1f12347 100644
+--- a/src/or/microdesc.c
++++ b/src/or/microdesc.c
+@@ -725,7 +725,7 @@ update_microdesc_downloads(time_t now)
+   smartlist_t *missing;
+   digestmap_t *pending;
+ 
+-  if (should_delay_dir_fetches(options))
++  if (should_delay_dir_fetches(options, NULL))
+     return;
+   if (directory_too_idle_to_fetch_descriptors(options, now))
+     return;
+diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
+index 1b5c6db..bcadc52 100644
+--- a/src/or/networkstatus.c
++++ b/src/or/networkstatus.c
+@@ -31,6 +31,7 @@
+ #include "router.h"
+ #include "routerlist.h"
+ #include "routerparse.h"
++#include "transports.h"
+ 
+ /* For tracking v2 networkstatus documents.  Only caches do this now. */
+ 
+@@ -1380,14 +1381,37 @@ update_consensus_networkstatus_fetch_time(time_t now)
+ 
+ /** Return 1 if there's a reason we shouldn't try any directory
+  * fetches yet (e.g. we demand bridges and none are yet known).
+- * Else return 0. */
++ * Else return 0.
++
++ * If we return 1 and <b>msg_out</b> is provided, set <b>msg_out</b>
++ * to an explanation of why directory fetches are delayed. (If we
++ * return 0, we set msg_out to NULL.)
++ */
+ int
+-should_delay_dir_fetches(const or_options_t *options)
++should_delay_dir_fetches(const or_options_t *options, const char **msg_out)
+ {
+-  if (options->UseBridges && !any_bridge_descriptors_known()) {
+-    log_info(LD_DIR, "delaying dir fetches (no running bridges known)");
+-    return 1;
++  if (msg_out) {
++    *msg_out = NULL;
+   }
++
++  if (options->UseBridges) {
++    if (!any_bridge_descriptors_known()) {
++      if (msg_out) {
++        *msg_out = "No running bridges";
++      }
++      log_info(LD_DIR, "Delaying dir fetches (no running bridges known)");
++      return 1;
++    }
++
++    if (pt_proxies_configuration_pending()) {
++      if (msg_out) {
++        *msg_out = "Pluggable transport proxies still configuring";
++      }
++      log_info(LD_DIR, "Delaying dir fetches (pt proxies still configuring)");
++      return 1;
++    }
++  }
++
+   return 0;
+ }
+ 
+@@ -1397,7 +1421,7 @@ void
+ update_networkstatus_downloads(time_t now)
+ {
+   const or_options_t *options = get_options();
+-  if (should_delay_dir_fetches(options))
++  if (should_delay_dir_fetches(options, NULL))
+     return;
+   if (authdir_mode_any_main(options) || options->FetchV2Networkstatus)
+     update_v2_networkstatus_cache_downloads(now);
+diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h
+index 761f8e7..f50f6f1 100644
+--- a/src/or/networkstatus.h
++++ b/src/or/networkstatus.h
+@@ -69,7 +69,7 @@ int networkstatus_nickname_is_unnamed(const char *nickname);
+ void networkstatus_consensus_download_failed(int status_code,
+                                              const char *flavname);
+ void update_consensus_networkstatus_fetch_time(time_t now);
+-int should_delay_dir_fetches(const or_options_t *options);
++int should_delay_dir_fetches(const or_options_t *options,const char **msg_out);
+ void update_networkstatus_downloads(time_t now);
+ void update_certificate_downloads(time_t now);
+ int consensus_is_waiting_for_certs(void);
+diff --git a/src/or/nodelist.c b/src/or/nodelist.c
+index 178f084..600a1fd 100644
+--- a/src/or/nodelist.c
++++ b/src/or/nodelist.c
+@@ -1439,6 +1439,7 @@ update_router_have_minimum_dir_info(void)
+   const networkstatus_t *consensus =
+     networkstatus_get_reasonably_live_consensus(now,usable_consensus_flavor());
+   int using_md;
++  const char *delay_fetches_msg = NULL;
+ 
+   if (!consensus) {
+     if (!networkstatus_get_latest_consensus())
+@@ -1451,10 +1452,9 @@ update_router_have_minimum_dir_info(void)
+     goto done;
+   }
+ 
+-  if (should_delay_dir_fetches(get_options())) {
+-    log_notice(LD_DIR, "no known bridge descriptors running yet; stalling");
+-    strlcpy(dir_info_status, "No live bridge descriptors.",
+-            sizeof(dir_info_status));
++  if (should_delay_dir_fetches(get_options(), &delay_fetches_msg)) {
++    log_notice(LD_DIR, "Delaying dir fetches: %s", delay_fetches_msg);
++    strlcpy(dir_info_status, "%s",  sizeof(dir_info_status));
+     res = 0;
+     goto done;
+   }
+diff --git a/src/or/routerlist.c b/src/or/routerlist.c
+index cb39729..d78c7bb 100644
+--- a/src/or/routerlist.c
++++ b/src/or/routerlist.c
+@@ -684,7 +684,7 @@ authority_certs_fetch_missing(networkstatus_t *status, time_t now)
+   char id_digest_str[2*DIGEST_LEN+1];
+   char sk_digest_str[2*DIGEST_LEN+1];
+ 
+-  if (should_delay_dir_fetches(get_options()))
++  if (should_delay_dir_fetches(get_options(), NULL))
+     return;
+ 
+   pending_cert = fp_pair_map_new();
+@@ -4901,7 +4901,7 @@ void
+ update_router_descriptor_downloads(time_t now)
+ {
+   const or_options_t *options = get_options();
+-  if (should_delay_dir_fetches(options))
++  if (should_delay_dir_fetches(options, NULL))
+     return;
+   if (!we_fetch_router_descriptors(options))
+     return;
+@@ -4925,7 +4925,7 @@ update_extrainfo_downloads(time_t now)
+   int n_no_ei = 0, n_pending = 0, n_have = 0, n_delay = 0;
+   if (! options->DownloadExtraInfo)
+     return;
+-  if (should_delay_dir_fetches(options))
++  if (should_delay_dir_fetches(options, NULL))
+     return;
+   if (!router_have_minimum_dir_info())
+     return;
+-- 
+1.8.1.2
+
diff --git a/gitian/patches/bug5018.patch b/gitian/patches/bug5018.patch
index 4784027..b0ac8e6 100644
--- a/gitian/patches/bug5018.patch
+++ b/gitian/patches/bug5018.patch
@@ -1,14 +1,14 @@
-From e967595b931c92650250cc385ef7f6aeabd887f5 Mon Sep 17 00:00:00 2001
+From 3394daa34842a397561e65002a33c13355df651d Mon Sep 17 00:00:00 2001
 From: George Kadianakis <desnacked at riseup.net>
 Date: Thu, 28 Feb 2013 18:58:36 +0200
-Subject: [PATCH 1/3] Only launch transport proxies that provide useful
+Subject: [PATCH 1/4] Only launch transport proxies that provide useful
  transports.
 
 ---
- changes/bug5018     |    3 +++
- src/or/config.c     |   20 ++++++++++++++++----
- src/or/entrynodes.c |   23 +++++++++++++++++++++++
- src/or/entrynodes.h |    1 +
+ changes/bug5018     |  3 +++
+ src/or/config.c     | 20 ++++++++++++++++----
+ src/or/entrynodes.c | 23 +++++++++++++++++++++++
+ src/or/entrynodes.h |  1 +
  4 files changed, 43 insertions(+), 4 deletions(-)
  create mode 100644 changes/bug5018
 
@@ -22,7 +22,7 @@ index 0000000..c5c12ef
 +    - Don't launch pluggable transport proxies that contribute
 +      transports we don't need. Resolves ticket 5018.
 diff --git a/src/or/config.c b/src/or/config.c
-index 3984755..5f905d5 100644
+index ef02946..47510c5 100644
 --- a/src/or/config.c
 +++ b/src/or/config.c
 @@ -4242,7 +4242,8 @@ parse_client_transport_line(const char *line, int validate_only)
@@ -118,17 +118,17 @@ index 52b8dc0..b02cd48 100644
  
  double pathbias_get_close_success_count(entry_guard_t *guard);
 -- 
-1.7.9.5
+1.8.1.2
 
-From d222f04e3a4093efc7be19f43def04d9c0704653 Mon Sep 17 00:00:00 2001
+From 54f75531a9613ee7b964be93b0051bc75322e7e3 Mon Sep 17 00:00:00 2001
 From: David Fifield <david at bamsoftware.com>
 Date: Sat, 26 Oct 2013 14:34:48 -0700
-Subject: [PATCH 2/3] Simplify transport_is_needed.
+Subject: [PATCH 2/4] Simplify transport_is_needed.
 
 By Roger at
 https://trac.torproject.org/projects/tor/ticket/5018#comment:11.
 ---
- src/or/entrynodes.c |   14 ++++----------
+ src/or/entrynodes.c | 14 ++++----------
  1 file changed, 4 insertions(+), 10 deletions(-)
 
 diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
@@ -163,21 +163,21 @@ index 4062cee..98a01c5 100644
  
  /** Remember a new bridge at <b>addr</b>:<b>port</b>. If <b>digest</b>
 -- 
-1.7.9.5
+1.8.1.2
 
-From c1e396e66773813e051e8c96df86b585031a833b Mon Sep 17 00:00:00 2001
+From 936ff64974b00a898fa0e77e3fd6f9b2df57f448 Mon Sep 17 00:00:00 2001
 From: David Fifield <david at bamsoftware.com>
 Date: Sat, 26 Oct 2013 14:37:50 -0700
-Subject: [PATCH 3/3] Document that unneeded transports are ignored.
+Subject: [PATCH 3/4] Document that unneeded transports are ignored.
 
 Suggested by Roger in
 https://trac.torproject.org/projects/tor/ticket/5018#comment:11.
 ---
- src/or/config.c |    3 ++-
+ src/or/config.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/or/config.c b/src/or/config.c
-index 5f905d5..3ae0216 100644
+index 47510c5..435d981 100644
 --- a/src/or/config.c
 +++ b/src/or/config.c
 @@ -4220,7 +4220,8 @@ parse_bridge_line(const char *line, int validate_only)
@@ -191,5 +191,35 @@ index 5f905d5..3ae0216 100644
   * our internal transport list.
   * - If it's a managed proxy line, launch the managed proxy. */
 -- 
-1.7.9.5
+1.8.1.2
+
+From a4cf8514af1d2dbfd15857af83076577b7dcc4ee Mon Sep 17 00:00:00 2001
+From: George Kadianakis <desnacked at riseup.net>
+Date: Mon, 10 Mar 2014 22:05:31 +0000
+Subject: [PATCH 4/4]  Tone down the log message for when we don't need a PT
+ proxy.
+
+Conflicts:
+	changes/bug5018
+---
+ src/or/config.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/or/config.c b/src/or/config.c
+index 435d981..914c3de 100644
+--- a/src/or/config.c
++++ b/src/or/config.c
+@@ -4295,8 +4295,8 @@ parse_client_transport_line(const char *line, int validate_only)
+ 
+   if (is_managed) { /* managed */
+     if (!validate_only && is_useless_proxy) {
+-      log_warn(LD_GENERAL, "Pluggable transport proxy (%s) does not provide "
+-               "any needed transports and will not be launched.", line);
++      log_notice(LD_GENERAL, "Pluggable transport proxy (%s) does not provide "
++                 "any needed transports and will not be launched.", line);
+     }
+ 
+     /* If we are not just validating, use the rest of the line as the
+-- 
+1.8.1.2
 
diff --git a/gitian/patches/bug9229.patch b/gitian/patches/bug9229.patch
new file mode 100644
index 0000000..6b1115c
--- /dev/null
+++ b/gitian/patches/bug9229.patch
@@ -0,0 +1,46 @@
+From db72479eea4b5bbd73d1fa33f4c9e4e4e2b99b04 Mon Sep 17 00:00:00 2001
+From: Nick Mathewson <nickm at torproject.org>
+Date: Mon, 10 Mar 2014 15:01:27 -0400
+Subject: [PATCH] Update ns downloads when we receive a bridge descriptor
+
+This prevents long stalls when we're starting with a state file but
+with no bridge descriptors.  Fixes bug 9229.  I believe this bug has
+been present since 0.2.0.3-alpha.
+---
+ changes/bug9229     | 5 +++++
+ src/or/entrynodes.c | 6 +++++-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+ create mode 100644 changes/bug9229
+
+diff --git a/changes/bug9229 b/changes/bug9229
+new file mode 100644
+index 0000000..ad7fd22
+--- /dev/null
++++ b/changes/bug9229
+@@ -0,0 +1,5 @@
++  o Minor bugfixes:
++    - Avoid 60-second delays in the bootstrapping process when Tor
++      is launching for a second time while using bridges. Fixes bug 9229;
++      bugfix on 0.2.0.3-alpha.
++
+diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
+index 2aa063c..59770fa 100644
+--- a/src/or/entrynodes.c
++++ b/src/or/entrynodes.c
+@@ -2115,8 +2115,12 @@ learned_bridge_descriptor(routerinfo_t *ri, int from_cache)
+        * our entry node list */
+       entry_guard_register_connect_status(ri->cache_info.identity_digest,
+                                           1, 0, now);
+-      if (first)
++      if (first) {
++        /* XXXX apparently, this is never called. See bug #9229. */
+         routerlist_retry_directory_downloads(now);
++      }
++
++      update_networkstatus_downloads(now);
+     }
+   }
+ }
+-- 
+1.8.1.2
+





More information about the tor-commits mailing list