Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket28669 035 01 #563

Merged

Conversation

Labels
None yet
Projects
None yet
3 participants
@dgoulet-tor
Copy link
Contributor

@dgoulet-tor dgoulet-tor commented Dec 4, 2018

No description provided.

dgoulet-tor added 4 commits Dec 4, 2018
The transition for a connection to either become or go back in
AP_CONN_STATE_RENDDESC_WAIT state must make sure that the entry connection is
_not_ in the waiting for circuit list.

This commit implements the helper function
connection_ap_mark_as_waiting_for_renddesc() that removes the entry connection
from the pending list and then change its state. This code pattern is used in
many places in the code where next commit will remove this code duplication to
use this new helper function.

Part of #28669

Signed-off-by: David Goulet <dgoulet@torproject.org>
Use the helper function connection_ap_mark_as_waiting_for_renddesc()
introduced in previous commit everywhere in the code where an AP connection
state is transitionned to AP_CONN_STATE_RENDDESC_WAIT.

Part of #28669

Signed-off-by: David Goulet <dgoulet@torproject.org>
This helper function marks an entry connection as pending for a circuit and
changes its state to AP_CONN_STATE_CIRCUIT_WAIT. The timestamps are set to
now() so it can be considered as new.

No behaviour change, this helper function will be used in next commit.

Part of #28669

Signed-off-by: David Goulet <dgoulet@torproject.org>
When retrying all SOCKS connection because new directory information just
arrived, do not BUG() if a connection in state AP_CONN_STATE_RENDDESC_WAIT is
found to have a usable descriptor.

There is a rare case when this can happen as detailed in #28669 so the right
thing to do is put that connection back in circuit wait state so the
descriptor can be retried.

Fixes #28669

Signed-off-by: David Goulet <dgoulet@torproject.org>
@coveralls
Copy link

@coveralls coveralls commented Dec 4, 2018

Pull Request Test Coverage Report for Build 3190

  • 0 of 18 (0.0%) changed or added relevant lines in 4 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.004%) to 60.309%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/or/circuituse.c 0 1 0.0%
src/feature/rend/rendclient.c 0 2 0.0%
src/core/or/connection_edge.c 0 4 0.0%
src/feature/hs/hs_client.c 0 11 0.0%
Files with Coverage Reduction New Missed Lines %
src/feature/hs/hs_client.c 2 51.32%
Totals Coverage Status
Change from base Build 3189: -0.004%
Covered Lines: 42848
Relevant Lines: 71048

💛 - Coveralls

@torproject-pusher torproject-pusher merged commit cec616a into torproject:maint-0.3.5 Jan 11, 2019
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment