diff options
author | David Goulet <dgoulet@torproject.org> | 2016-12-22 12:37:42 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-01-22 19:02:01 -0500 |
commit | 96c7ddbc7e8a38385fa0f7b5d810d0bf8bdf6990 (patch) | |
tree | 5e11c7007110cd30991611c3a32dfdb5001fb94c /src/or | |
parent | 46aee42cb99dcf3cba69091aeceb1f61d3961f3a (diff) | |
download | tor-96c7ddbc7e8a38385fa0f7b5d810d0bf8bdf6990.tar.gz tor-96c7ddbc7e8a38385fa0f7b5d810d0bf8bdf6990.zip |
circuit: Change close reasons from uint16_t to int
When marking for close a circuit, the reason value, a integer, was assigned to
a uint16_t converting any negative reasons (internal) to the wrong value. On
the HS side, this was causing the client to flag introduction points to be
unreachable as the internal reason was wrongfully converted to a positive
16bit value leading to flag 2 out of 3 intro points to be unreachable.
Fixes #20307 and partially fixes #21056
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/or.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h index 66717792b4..b7c67baf93 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2964,11 +2964,11 @@ typedef struct circuit_t { /** For what reason (See END_CIRC_REASON...) is this circuit being closed? * This field is set in circuit_mark_for_close and used later in * circuit_about_to_free. */ - uint16_t marked_for_close_reason; + int marked_for_close_reason; /** As marked_for_close_reason, but reflects the underlying reason for * closing this circuit. */ - uint16_t marked_for_close_orig_reason; + int marked_for_close_orig_reason; /** Unique ID for measuring tunneled network status requests. */ uint64_t dirreq_id; |