0/8 doesn't count as a /8 subnet towards an Exit flag

This commit is contained in:
Sebastian Hahn 2010-02-05 13:40:31 +01:00
parent 080e8f50f8
commit 20422cde2b

View File

@ -883,7 +883,7 @@ exit_policy_is_general_exit_helper(smartlist_t *policy, int port)
if (subnet_status[j] != 0)
continue; /* We already reject some part of this /8 */
tor_addr_from_ipv4h(&addr, j<<24);
if (tor_addr_is_internal(&addr, 1)) /* 1 because * = 0.0.0.0 */
if (tor_addr_is_internal(&addr, 0))
continue; /* Local or non-routable addresses */
if (tor_addr_compare_masked(&addr, &p->addr, p->maskbits,
CMP_EXACT) == 0) {