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

Commit

Permalink
fix: simplify address replacement
Browse files Browse the repository at this point in the history
We only ever want to dial the remote peer's observed address (to prevent
DoS attacks), so we might as well _always_ replace the reported
addresses with the observed address.

This also fixes a few issues in the original PR:

* Simpler logic.
* Replaces the IP address, not the port. That's what we actually care about.
* Won't accidentally dial "skipped" protocols (e.g., circuit transport).
  • Loading branch information
Stebalien committed Feb 25, 2021
1 parent 7de1c95 commit aa794f7
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 147 deletions.
Loading

0 comments on commit aa794f7

Please sign in to comment.