Merge branch 'maint-0.3.3' into release-0.3.3

This commit is contained in:
Nick Mathewson 2018-04-11 10:48:46 -04:00
commit 6a0b31e5a7
3 changed files with 13 additions and 1 deletions

4
changes/bug24989 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes (hidden services):
- Re-instate counting pending client HSDir fetch circuits against the
MaxClientCircuitsPending rate limit. Fixes bug 24989; bugfix on
0.3.3.0-alpha-dev.

View File

@ -384,7 +384,7 @@ count_pending_general_client_circuits(void)
SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, circ) {
if (circ->marked_for_close ||
circ->state == CIRCUIT_STATE_OPEN ||
circ->purpose != CIRCUIT_PURPOSE_C_GENERAL ||
!CIRCUIT_PURPOSE_COUNTS_TOWARDS_MAXPENDING(circ->purpose) ||
!CIRCUIT_IS_ORIGIN(circ))
continue;

View File

@ -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