diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2018-01-24 00:03:24 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-11 10:47:06 -0400 |
commit | f9ba0c65467fe80f65b3789365cfac874198a337 (patch) | |
tree | 5ca70797401b58bfd9a9dd825a26b2f469fb041d /src/or/or.h | |
parent | 0b1a054d68f4ebb760add6d3a1bda75fb8b17553 (diff) | |
download | tor-f9ba0c65467fe80f65b3789365cfac874198a337.tar.gz tor-f9ba0c65467fe80f65b3789365cfac874198a337.zip |
Bug 24989: Count client hsdir gets towards MaxClientCircuitsPending.
We removed this by breaking them out from general in #13837.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index 2397f66511..e54d3806ef 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -586,6 +586,14 @@ typedef enum { /** True iff the circuit_t c is actually an or_circuit_t */ #define CIRCUIT_IS_ORCIRC(c) (((circuit_t *)(c))->magic == OR_CIRCUIT_MAGIC) +/** True iff this circuit purpose should count towards the global + * pending rate limit (set by MaxClientCircuitsPending). We count all + * general purpose circuits, as well as the first step of client onion + * service connections (HSDir gets). */ +#define CIRCUIT_PURPOSE_COUNTS_TOWARDS_MAXPENDING(p) \ + ((p) == CIRCUIT_PURPOSE_C_GENERAL || \ + (p) == CIRCUIT_PURPOSE_C_HSDIR_GET) + /** How many circuits do we want simultaneously in-progress to handle * a given stream? */ #define MIN_CIRCUITS_HANDLING_STREAM 2 |