Commit 5beef65a authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Stop excluding OR addresses from exit_addresses.

Fixes #25332.
parent 947ce706
# 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.
......
......@@ -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());
......
......@@ -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<>();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment