Commit 941ffd69 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Remove disappearing family members.

When a relay stops writing any family members into its server
descriptor we never cleared old family members but kept them forever.
We should do that.

Fixes #28314.
parent 98eb9d73
# Changes in version 7.0-1.2?.? - 2019-1?-??
* Medium changes
- Remove declared/alleged family members after they disappear from
server descriptors.
# Changes in version 7.0-1.21.1 - 2019-11-09
* Minor changes
......
......@@ -172,8 +172,8 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
detailsStatus.setExitPolicy(descriptor.getExitPolicyLines());
detailsStatus.setContact(descriptor.getContact());
detailsStatus.setPlatform(descriptor.getPlatform());
SortedSet<String> declaredFamily = new TreeSet<>();
if (descriptor.getFamilyEntries() != null) {
SortedSet<String> declaredFamily = new TreeSet<>();
for (String familyMember : descriptor.getFamilyEntries()) {
if (familyMember.startsWith("$") && familyMember.length() >= 41) {
declaredFamily.add(
......@@ -182,8 +182,8 @@ public class NodeDetailsStatusUpdater implements DescriptorListener,
declaredFamily.add(familyMember);
}
}
this.declaredFamilies.put(fingerprint, declaredFamily);
}
this.declaredFamilies.put(fingerprint, declaredFamily);
if (descriptor.getIpv6DefaultPolicy() != null
&& (descriptor.getIpv6DefaultPolicy().equals("accept")
|| descriptor.getIpv6DefaultPolicy().equals("reject"))
......
Markdown is supported
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