[tor-commits] [bridgedb/master] Change allVanillaAddresses; Stem only allows the ORAddresses to be IPv4.

isis at torproject.org isis at torproject.org
Sat Mar 21 02:03:01 UTC 2015


commit 281aa6deda4a4d43f8fd57f72ffa4c324ec7767a
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sat Feb 14 03:16:17 2015 +0000

    Change allVanillaAddresses; Stem only allows the ORAddresses to be IPv4.
    
     * CHANGE Bridge.allVanillaAddresses to only expect the Bridge's primary
       ORAddress to be IPv4.
---
 lib/bridgedb/bridges.py |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/bridgedb/bridges.py b/lib/bridgedb/bridges.py
index 3c47967..e59a2ad 100644
--- a/lib/bridgedb/bridges.py
+++ b/lib/bridgedb/bridges.py
@@ -1020,11 +1020,9 @@ class Bridge(BridgeBackwardsCompatibility):
             address and port.
         """
         addresses = self.orAddresses
-        # Add the default ORPort address:
-        if isIPv4(self.address):
-            addresses.append((self.address, self.orPort, 4))
-        elif isIPv6(self.address):
-            addresses.append((self.address, self.orPort, 6))
+        # Add the default ORPort address (it will always be IPv4, otherwise
+        # Stem should have raised a ValueError during parsing):
+        addresses.append((self.address, self.orPort, 4))
         return addresses
 
     def assertOK(self):





More information about the tor-commits mailing list