summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2017-12-11 15:03:44 -0600
committerTom Ritter <tom@ritter.vg>2017-12-11 15:03:44 -0600
commit62a10c50ccb4956ebcd6c010ddf93139c0cc54b6 (patch)
treeebae3ab647a8b3e1f4aca6796611d5bed98f82f4
parent5a8e4af0d4a1b7ea62a79d37eda63b3a5c6bcd6c (diff)
Add a NoIPv6Consensus flag to indicate when the authorities could not form a consensus about a relay's IPv6 address. Closes #24557
-rwxr-xr-xwebsite.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/website.py b/website.py
index c71e486..fc9cf91 100755
--- a/website.py
+++ b/website.py
@@ -86,6 +86,7 @@ class WebsiteWriter:
self.already_added_pseudoflags = True
# Add the ReachableIPv6 flag
+ routers_with_ipv6 = set()
for dirauth_nickname in self.known_authorities:
if dirauth_nickname in self.votes:
vote = self.votes[dirauth_nickname]
@@ -93,13 +94,18 @@ class WebsiteWriter:
for r in vote.routers:
if len([a for a in vote.routers[r].or_addresses if a[2] == True]):
has_ipv6 = True
+ routers_with_ipv6.add(r)
vote.routers[r].flags.append('ReachableIPv6')
if has_ipv6:
vote.known_flags.append('ReachableIPv6')
+ vote.known_flags.append('NoIPv6Consensus')
for r in self.consensus.routers:
if len([a for a in self.consensus.routers[r].or_addresses if a[2] == True]):
self.consensus.routers[r].flags.append('ReachableIPv6')
+ elif r in routers_with_ipv6:
+ self.consensus.routers[r].flags.append('NoIPv6Consensus')
self.consensus.known_flags.append('ReachableIPv6')
+ self.consensus.known_flags.append('NoIPv6Consensus')
#-----------------------------------------------------------------------------------------
def _write_page_header(self, include_relay_info):