diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-22 15:20:41 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-22 15:21:56 -0400 |
commit | ceb6585a4bc2beadde2fb194395711e72ee8559d (patch) | |
tree | 49e2c28d001d9f11daf0b2c60df768b912115794 /src/core/or | |
parent | c9751e26119e375fcbc74107e89958957c00ee5e (diff) | |
download | tor-ceb6585a4bc2beadde2fb194395711e72ee8559d.tar.gz tor-ceb6585a4bc2beadde2fb194395711e72ee8559d.zip |
Treat all extorport connections with un-set addresses as remote
Without this fix, if an PT forgets to send a USERADDR command, that
results in a connection getting treated as local for the purposes of
rate-limiting.
If the PT _does_ use USERADDR, we still believe it.
Closes ticket 33747.
Diffstat (limited to 'src/core/or')
-rw-r--r-- | src/core/or/connection_st.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/or/connection_st.h b/src/core/or/connection_st.h index d1430eda14..c197a81340 100644 --- a/src/core/or/connection_st.h +++ b/src/core/or/connection_st.h @@ -64,6 +64,9 @@ struct connection_t { /** True if connection_handle_write is currently running on this connection. */ unsigned int in_connection_handle_write:1; + /** If true, then we treat this connection as remote for the purpose of + * rate-limiting, no matter what its address is. */ + unsigned int always_rate_limit_as_remote:1; /* For linked connections: */ |