mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-26 07:31:33 +01:00
Reverting the accounting thing introduced in 5492de76
till I think how it should be done properly.
This commit is contained in:
parent
684aca7faf
commit
86b20e0d8a
1 changed files with 3 additions and 7 deletions
|
@ -2080,8 +2080,6 @@ connection_is_rate_limited(connection_t *conn)
|
||||||
or_options_t *options = get_options();
|
or_options_t *options = get_options();
|
||||||
if (conn->linked)
|
if (conn->linked)
|
||||||
return 0; /* Internal connection */
|
return 0; /* Internal connection */
|
||||||
else if (connection_uses_transport(conn)) /* pluggable transport proxy */
|
|
||||||
return 1;
|
|
||||||
else if (! options->CountPrivateBandwidth &&
|
else if (! options->CountPrivateBandwidth &&
|
||||||
(tor_addr_family(&conn->addr) == AF_UNSPEC || /* no address */
|
(tor_addr_family(&conn->addr) == AF_UNSPEC || /* no address */
|
||||||
tor_addr_is_internal(&conn->addr, 0)))
|
tor_addr_is_internal(&conn->addr, 0)))
|
||||||
|
@ -4158,11 +4156,9 @@ int
|
||||||
connection_uses_transport(connection_t *conn)
|
connection_uses_transport(connection_t *conn)
|
||||||
{
|
{
|
||||||
const transport_t *transport=NULL;
|
const transport_t *transport=NULL;
|
||||||
if (find_transport_by_bridge_addrport(&conn->addr,
|
find_transport_by_bridge_addrport(&conn->addr,
|
||||||
conn->port,&transport) == 0)
|
conn->port,&transport);
|
||||||
return 1;
|
return transport ? 1 : 0;
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the global proxy type used by tor. */
|
/** Returns the global proxy type used by tor. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue