Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Connect to 127.0.0.1, not localhost, for tor control channel. Tweak error branches for clarity. #14554

Merged
merged 3 commits into from
Jun 26, 2018

Conversation

riastradh-brave
Copy link
Contributor

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

May fix Brave's failure to connect to Tor on some networks, with the
following symptom printed to the console:

    tor: control socket error: Error: getaddrinfo ENOTFOUND localhost undefined:55219
    tor: control socket error: Error: getaddrinfo ENOTFOUND localhost undefined:55219
    tor: control socket closed early

Auditors: @diracdeltas

Test Plan:
Sneak into David's house and try running Brave on his home network.
If he has reconfigured it, invent a time machine to revert it to the
previous state where it didn't work.
@diracdeltas
Copy link
Member

@riastradh-brave is there an issue this is fixing?

@diracdeltas diracdeltas requested a review from bsclifton June 26, 2018 04:24
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works good for me (ex: doesn't break anything). Let's merge it!

@bsclifton bsclifton merged commit c5122ad into tor/0.23.x Jun 26, 2018
@bsclifton bsclifton deleted the riastradh-tor-tweakcontrolconnection branch June 26, 2018 05:36
bsclifton pushed a commit that referenced this pull request Jun 26, 2018
…rror branches for clarity. (#14554)

* Use host 127.0.0.1 explicitly, instead of defaulting to localhost.

May fix Brave's failure to connect to Tor on some networks, with the
following symptom printed to the console:

    tor: control socket error: Error: getaddrinfo ENOTFOUND localhost undefined:55219
    tor: control socket error: Error: getaddrinfo ENOTFOUND localhost undefined:55219
    tor: control socket closed early

Auditors: @diracdeltas

Test Plan:
Sneak into David's house and try running Brave on his home network.
If he has reconfigured it, invent a time machine to revert it to the
previous state where it didn't work.

* Make early error message distinct.

* Pass error along to control connection destruction for consistency.
@riastradh-brave
Copy link
Contributor Author

@diracdeltas Informally, yes, but no issue was filed for it. I can file an issue and close it once we confirm it's fixed.

@riastradh-brave
Copy link
Contributor Author

#14560

bsclifton pushed a commit that referenced this pull request Jun 27, 2018
…rror branches for clarity. (#14554)

* Use host 127.0.0.1 explicitly, instead of defaulting to localhost.

May fix Brave's failure to connect to Tor on some networks, with the
following symptom printed to the console:

    tor: control socket error: Error: getaddrinfo ENOTFOUND localhost undefined:55219
    tor: control socket error: Error: getaddrinfo ENOTFOUND localhost undefined:55219
    tor: control socket closed early

Auditors: @diracdeltas

Test Plan:
Sneak into David's house and try running Brave on his home network.
If he has reconfigured it, invent a time machine to revert it to the
previous state where it didn't work.

* Make early error message distinct.

* Pass error along to control connection destruction for consistency.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants