[tor-commits] [stem/master] Fix exit port counts

atagar at torproject.org atagar at torproject.org
Fri Dec 22 22:07:57 UTC 2017


commit db311d101d9c07e081bafcb756c868f7e0b3cbf4
Author: Damian Johnson <atagar at torproject.org>
Date:   Fri Dec 22 14:07:21 2017 -0800

    Fix exit port counts
    
    Grrr, I made a mistake similar to this earlier. Caught thanks to toralf.
---
 docs/_static/example/relay_connections.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/_static/example/relay_connections.py b/docs/_static/example/relay_connections.py
index 42c22fa5..5b80caf8 100755
--- a/docs/_static/example/relay_connections.py
+++ b/docs/_static/example/relay_connections.py
@@ -110,7 +110,7 @@ def main():
     total_ipv4, total_ipv6 = 0, 0
 
     for port in sorted(exit_connections):
-      ipv4_count = len([conn for conn in connections if is_valid_ipv4_address(conn.remote_address)])
+      ipv4_count = len([conn for conn in exit_connections if is_valid_ipv4_address(conn.remote_address)])
       ipv6_count = len(exit_connections) - ipv4_count
       total_ipv4, total_ipv6 = total_ipv4 + ipv4_count, total_ipv6 + ipv6_count
 



More information about the tor-commits mailing list