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

[tor-bugs] #7190 [Tor]: tor client ignores ClientRejectInternalAddresses when considering short exit policies



#7190: tor client ignores ClientRejectInternalAddresses when considering short
exit policies
------------------------------------+---------------------------------------
 Reporter:  arma                    |          Owner:                    
     Type:  defect                  |         Status:  new               
 Priority:  normal                  |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor                     |        Version:  Tor: 0.2.3.23-rc  
 Keywords:  tor-client, regression  |         Parent:                    
   Points:                          |   Actualpoints:                    
------------------------------------+---------------------------------------
 Erik Kline found that when setting up an internal Tor network using 0.2.3,
 even if the exit relays support exiting to an 'internal' IP address, the
 client preemptively refuses to do so.

 Here's the patch he provides:
 {{{
 diff -rupN tmp/tor-0.2.3.20-rc/src/or/policies.c
 tor-0.2.3.20-rc/src/or/policies.c
 --- tmp/tor-0.2.3.20-rc/src/or/policies.c       2012-08-04
 22:24:35.000000000 -0700
 +++ tor-0.2.3.20-rc/src/or/policies.c   2012-09-11 10:28:19.000000000
 -0700
 @@ -1428,13 +1428,13 @@ compare_tor_addr_to_short_policy(const t
    int found_match = 0;
    int accept;
    (void)addr;
 -
    tor_assert(port != 0);

    if (addr && tor_addr_is_null(addr))
      addr = NULL; /* Unspec means 'no address at all,' in this context. */

 -  if (addr && (tor_addr_is_internal(addr, 0) ||
 +  if (addr && ((tor_addr_is_internal(addr, 0)
 +               && get_options()->ClientRejectInternalAddresses) ||
                 tor_addr_is_loopback(addr)))
      return ADDR_POLICY_REJECTED;
 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7190>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs