Skip to content
Snippets Groups Projects
Commit 20422cde authored by Sebastian Hahn's avatar Sebastian Hahn
Browse files

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

parent 080e8f50
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment