commit f73953b08c7df47dc47a9c9d4aa16e794a156acf Author: Mike Perry mikeperry-git@torproject.org Date: Thu Mar 26 23:05:23 2015 -0700
Bug 15482: Don't surprise users with new circuits while a page is in use
This patch resets timestamp_dirty every time a new stream is attached to a circuit. --- gitian/descriptors/linux/gitian-tor.yml | 3 +++ gitian/descriptors/mac/gitian-tor.yml | 3 +++ gitian/descriptors/windows/gitian-tor.yml | 3 +++ gitian/patches/bug15482.patch | 32 +++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+)
diff --git a/gitian/descriptors/linux/gitian-tor.yml b/gitian/descriptors/linux/gitian-tor.yml index 7338f2d..b218486 100644 --- a/gitian/descriptors/linux/gitian-tor.yml +++ b/gitian/descriptors/linux/gitian-tor.yml @@ -21,6 +21,7 @@ files: - "versions" - "bug8402-master.patch" - "bug8405.patch" +- "bug15482.patch" - "dzip.sh" - "openssl-linux32-utils.zip" - "openssl-linux64-utils.zip" @@ -80,6 +81,8 @@ script: | then git am ~/build/bug8405.patch git am ~/build/bug8402-master.patch + else + git am ~/build/bug15482.patch fi mkdir -p $OUTDIR/src #git archive HEAD | tar -x -C $OUTDIR/src diff --git a/gitian/descriptors/mac/gitian-tor.yml b/gitian/descriptors/mac/gitian-tor.yml index 08408f8..3d0e0c6 100644 --- a/gitian/descriptors/mac/gitian-tor.yml +++ b/gitian/descriptors/mac/gitian-tor.yml @@ -17,6 +17,7 @@ files: - "versions" - "bug8402-master.patch" - "bug8405.patch" +- "bug15482.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" - "dzip.sh" @@ -58,6 +59,8 @@ script: | then git am ~/build/bug8405.patch git am ~/build/bug8402-master.patch + else + git am ~/build/bug15482.patch fi mkdir -p $OUTDIR/src #git archive HEAD | tar -x -C $OUTDIR/src diff --git a/gitian/descriptors/windows/gitian-tor.yml b/gitian/descriptors/windows/gitian-tor.yml index 7db511b..87e1dc2 100644 --- a/gitian/descriptors/windows/gitian-tor.yml +++ b/gitian/descriptors/windows/gitian-tor.yml @@ -17,6 +17,7 @@ files: - "versions" - "bug8402-master.patch" - "bug8405.patch" +- "bug15482.patch" - "binutils.tar.bz2" - "dzip.sh" - "mingw-w64-win32-utils.zip" @@ -58,6 +59,8 @@ script: | then git am ~/build/bug8405.patch git am ~/build/bug8402-master.patch + else + git am ~/build/bug15482.patch fi mkdir -p $OUTDIR/src #git archive HEAD | tar -x -C $OUTDIR/src diff --git a/gitian/patches/bug15482.patch b/gitian/patches/bug15482.patch new file mode 100644 index 0000000..5250fe4 --- /dev/null +++ b/gitian/patches/bug15482.patch @@ -0,0 +1,32 @@ +From a9c7e6dc3508e78f4b296e38603dd34174e2a14c Mon Sep 17 00:00:00 2001 +From: Mike Perry mikeperry-git@torproject.org +Date: Thu, 26 Mar 2015 22:38:45 -0700 +Subject: [PATCH] Bug 15482: Don't abandon circuits that are still being used + by TBB. + +Reset timestamp_dirty every time we get a new stream request so that circuits +are not abandoned while still in use. +--- + src/or/circuituse.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/or/circuituse.c b/src/or/circuituse.c +index d0d31ad..fff46cd 100644 +--- a/src/or/circuituse.c ++++ b/src/or/circuituse.c +@@ -2264,8 +2264,10 @@ connection_ap_handshake_attach_chosen_circuit(entry_connection_t *conn, + + base_conn->state = AP_CONN_STATE_CIRCUIT_WAIT; + +- if (!circ->base_.timestamp_dirty) +- circ->base_.timestamp_dirty = time(NULL); ++ /* For Tor Browser, we want to avoid surprising the user by giving up on ++ * circuits while they are still being used, so we always reset the ++ * dirtiness timestamp. */ ++ circ->base_.timestamp_dirty = time(NULL); + + pathbias_count_use_attempt(circ); + +-- +1.9.1 +
tbb-commits@lists.torproject.org