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

[tor-commits] [tor/master] exit_policy_is_general_exit is IPv4 only; it should admit it.



commit 8b01fd7badc893b849d4394a2b72d422eecf7913
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Sun Mar 6 13:16:53 2011 -0500

    exit_policy_is_general_exit is IPv4 only; it should admit it.
---
 src/or/policies.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/or/policies.c b/src/or/policies.c
index 0a8fd73..f8c36c7 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -880,6 +880,8 @@ exit_policy_is_general_exit(smartlist_t *policy)
 
   for (i = 0; i < 3; ++i) {
     SMARTLIST_FOREACH(policy, addr_policy_t *, p, {
+      if (tor_addr_family(&p->addr) != AF_INET)
+        continue; /* IPv4 only for now */
       if (p->prt_min > ports[i] || p->prt_max < ports[i])
         continue; /* Doesn't cover our port. */
       if (p->maskbits > 8)



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