diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-02 21:00:35 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-02 21:00:35 +0000 |
commit | bff83b666c4c363d8e31051ba309d9290c6170fb (patch) | |
tree | 7eaba77610d242b4bbc3fb4d5700a2385e238ef7 /src/or/connection.c | |
parent | d75edc35ccddac21717ec2862607b18b91330bd5 (diff) | |
download | tor-bff83b666c4c363d8e31051ba309d9290c6170fb.tar tor-bff83b666c4c363d8e31051ba309d9290c6170fb.tar.gz |
r8846@totoro: nickm | 2006-10-02 16:59:57 -0400
Move is_local_IP to config.c; have it check for same-/24; make it used only for reachability (not for banwidth, because that is probably not what we want). Fixes an XXX.
svn:r8578
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 9c64e324f..3450bf184 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -1425,7 +1425,7 @@ connection_read_to_buf(connection_t *conn, int *max_to_read) *max_to_read = at_most - result; } - if (result > 0 && !is_local_IP(conn->addr)) { /* remember it */ + if (result > 0 && !is_internal_IP(conn->addr, 0)) { /* remember it */ rep_hist_note_bytes_read(result, time(NULL)); connection_read_bucket_decrement(conn, result); } @@ -1601,7 +1601,7 @@ connection_handle_write(connection_t *conn) } if (result > 0) { - if (!is_local_IP(conn->addr)) { /* remember it */ + if (!is_internal_IP(conn->addr, 0)) { /* remember it */ rep_hist_note_bytes_written(result, time(NULL)); global_write_bucket -= result; } @@ -1646,7 +1646,7 @@ _connection_controller_force_write(control_connection_t *control_conn) } if (result > 0) { - if (!is_local_IP(conn->addr)) { /* remember it */ + if (!is_internal_IP(conn->addr, 0)) { /* remember it */ rep_hist_note_bytes_written(result, time(NULL)); global_write_bucket -= result; } |