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

[tor-commits] [depictor/master] Add a NoIPv6Consensus flag to indicate when the authorities could not form a consensus about a relay's IPv6 address. Closes #24557



commit 62a10c50ccb4956ebcd6c010ddf93139c0cc54b6
Author: Tom Ritter <tom@xxxxxxxxx>
Date:   Mon Dec 11 15:03:44 2017 -0600

    Add a NoIPv6Consensus flag to indicate when the authorities could not form a consensus about a relay's IPv6 address. Closes #24557
---
 website.py | 6 ++++++
 1 file changed, 6 insertions(+)

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):

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