[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [onionoo/release] Stop excluding OR addresses from exit_addresses.



commit 5beef65a168e7bf74be9aa25b599380bf02052e1
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Tue Apr 3 17:10:27 2018 +0200

    Stop excluding OR addresses from exit_addresses.
    
    Fixes #25332.
---
 CHANGELOG.md                                                     | 4 ++++
 .../org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java | 6 +-----
 .../org/torproject/onionoo/writer/DetailsDocumentWriter.java     | 9 +++------
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 692a417..b4efed7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
 # Changes in version 6.0-1.13.0 - 2018-04-??
 
+ * Medium changes
+   - Change the "exit_addresses" field to not exclude current OR
+     addresses anymore.
+
  * Minor changes
    - Turn valid utf-8 escape sequences into utf-8 characters.
 
diff --git a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
index 6f9bdea..b34d2ef 100644
--- a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
+++ b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
@@ -833,11 +833,7 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
         }
       }
       detailsStatus.setExitAddresses(exitAddresses);
-      SortedSet<String> exitAddressesWithoutOrAddresses =
-          new TreeSet<>(exitAddresses.keySet());
-      exitAddressesWithoutOrAddresses.removeAll(
-          nodeStatus.getOrAddresses());
-      nodeStatus.setExitAddresses(exitAddressesWithoutOrAddresses);
+      nodeStatus.setExitAddresses(new TreeSet<>(exitAddresses.keySet()));
 
       detailsStatus.setAllegedFamily(nodeStatus.getAllegedFamily());
       detailsStatus.setEffectiveFamily(nodeStatus.getEffectiveFamily());
diff --git a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
index 4aace51..a335916 100644
--- a/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
+++ b/src/main/java/org/torproject/onionoo/writer/DetailsDocumentWriter.java
@@ -143,12 +143,9 @@ public class DetailsDocumentWriter implements DocumentWriter {
         detailsStatus.getExitPolicyV6Summary());
     detailsDocument.setHibernating(detailsStatus.getHibernating());
     if (detailsStatus.getExitAddresses() != null) {
-      SortedSet<String> exitAddressesWithoutOrAddresses =
-          new TreeSet<>(detailsStatus.getExitAddresses().keySet());
-      exitAddressesWithoutOrAddresses.removeAll(
-          detailsStatus.getOrAddresses());
-      detailsDocument.setExitAddresses(new ArrayList<>(
-          exitAddressesWithoutOrAddresses));
+      List<String> exitAddresses = new ArrayList<>(new TreeSet<>(
+          detailsStatus.getExitAddresses().keySet()));
+      detailsDocument.setExitAddresses(exitAddresses);
     }
     detailsDocument.setMeasured(detailsStatus.getMeasured());
     List<String> unreachableOrAddresses = new ArrayList<>();



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits