aboutsummaryrefslogtreecommitdiff
path: root/changes
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-11-13 10:22:10 -0500
committerNick Mathewson <nickm@torproject.org>2018-11-14 15:42:52 -0500
commitc99f220f7857e40bd9c09bd0c240b3b9aea4d6f8 (patch)
tree443e4ec9e21cabc395d35ae8c22992c0e41cf21e /changes
parent42be1c668b9f8ec255afb307054e6388f478e837 (diff)
downloadtor-c99f220f7857e40bd9c09bd0c240b3b9aea4d6f8.tar.gz
tor-c99f220f7857e40bd9c09bd0c240b3b9aea4d6f8.zip
conn: Close the read side of a closing connection when write limit is reached
In conn_close_if_marked(), we can decide to keep a connection open that still has data to flush on the wire if it is being rate limited on the write side. However, in this process, we were also looking at the read() side which can still have token in its bucket and thus not stop the reading. This lead to a BUG() introduced in 0.3.4.1-alpha that was expecting the read side to be closed due to the rate limit but which only applies on the write side. This commit removes any bandwidth check on the read side and simply stop the read side on the connection regardless of the bucket state. If we keep the connection open to flush it out before close, we should not read anything. Fixes #27750 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'changes')
-rw-r--r--changes/bug277506
1 files changed, 6 insertions, 0 deletions
diff --git a/changes/bug27750 b/changes/bug27750
new file mode 100644
index 0000000000..c234788b1c
--- /dev/null
+++ b/changes/bug27750
@@ -0,0 +1,6 @@
+ o Minor bugfixes (connection, relay):
+ - Avoid a wrong BUG() stacktrace in case a closing connection is being held
+ open because the write side is rate limited but not the read side. Now,
+ the connection read side is simply shutdown instead of kept open until tor
+ is able to flush the connection and then fully close it. Fixes bug 27750;
+ bugfix on 0.3.4.1-alpha.