Age | Commit message (Collapse) | Author |
|
|
|
I was expecting this to be much worse.
|
|
|
|
Now the entire connection_t hierarchy is extracted from or.h
|
|
|
|
For once, it's a type that is used almost nowhere else besides the
logical place.
|
|
|
|
This one was actually fairly simple.
|
|
|
|
|
|
|
|
|
|
|
|
This fixes the XXXX case that we had before, and also enforces the
rule that we won't open connections when we're in hard hibernation.
|
|
Everywhere we use we_are_hibernating(), remind the reader what it
means.
(Also, add an XXXX to note a DisableNetwork usage to change later.)
|
|
|
|
|
|
This is part of 26009, where we're going to keep track of the
current time and its jumps without having to do so in
second_elapsed_callback.
|
|
Previously were using this value to have a cheap highish-resolution
timer. But we were only using it in one place, and current dogma is
to use monotime_coarse_t for this kind of thing.
|
|
|
|
|
|
|
|
|
|
Now that we update our buckets on demand before reading or writing,
we no longer need to update them all every TokenBucketRefillInterval
msec.
When a connection runs out of bandwidth, we do need a way to
reenable it, however. We do this by scheduling a timer to reenable
all blocked connections for TokenBucketRefillInterval msec after a
connection becomes blocked.
(If we were using PerConnBWRate more, it might make sense to have a
per-connection timer, rather than a single timeout. But since
PerConnBWRate is currently (mostly) unused, I'm going to go for the
simpler approach here, since usually whenever one connection has
become blocked on bandwidth, most connections are blocked on
bandwidth.)
Implements ticket 25373.
|
|
Previously this was done as part of the refill callback, but there's
no real reason to do it like that. Since we're trying to remove the
refill callback completely, we can do this work as part of
record_num_bytes_transferred_impl(), which already does quite a lot
of this.
|
|
(This patch does not yet eliminate the global refill callback;
fortunately, bucket refilling is idempotent.)
|
|
We used to do this 10x per second in connection_buckets_refill();
instead, we now do it when the bucket becomes empty. This change is
part of the work of making connection_buckets_refill() obsolete.
Closes ticket 25828; bugfix on 0.2.3.5-alpha.
|
|
Also document its actual behavior
|
|
There was nothing round_robinish about this function.
|
|
Right now, this patch just introduces and exposes some new
functions. Later, these functions will get a little more complexity.
|
|
|
|
|
|
This is a simple search-and-replace to rename the token bucket type
to indicate that it contains both a read and a write bucket, bundled
with their configuration. It's preliminary to refactoring the
bucket type.
|
|
|
|
|
|
|
|
|
|
This option was used for shadow testing previously, but is no longer
used for anything. It interferes with refactoring our token buckets.
|
|
* ADD new /src/common/crypto_rand.[ch] module.
* ADD new /src/common/crypto_util.[ch] module (contains the memwipe()
function, since all crypto_* modules need this).
* FIXES part of #24658: https://bugs.torproject.org/24658
|
|
|
|
|
|
|
|
|
|
|
|
At this commit, the SocksSocketsGroupWritable option is renamed to
UnixSocksGroupWritable. A deprecated warning is triggered if the old option is
used and tor will use it properly.
Fixes #24343
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
connection_t.timestamp_lastwritten renamed to
connection_t.timestamp_last_write_allowed
connection_t.timestamp_lastread renamed to
connection_t.timestamp_last_read_allowed
Closes ticket 24714.
|
|
|
|
Defend against an address that has reached the concurrent connection count
threshold.
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Implement a basic connection tracking that counts the number of concurrent
connections when they open and close.
This commit also adds the circuit creation mitigation data structure that will
be needed at later commit to keep track of the circuit rate.
Signed-off-by: David Goulet <dgoulet@torproject.org>
|