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

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



commit 281aa6deda4a4d43f8fd57f72ffa4c324ec7767a
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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):



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