diff options
-rw-r--r-- | changes/ipv6_crash | 3 | ||||
-rw-r--r-- | src/or/policies.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/changes/ipv6_crash b/changes/ipv6_crash new file mode 100644 index 0000000000..2b04355a57 --- /dev/null +++ b/changes/ipv6_crash @@ -0,0 +1,3 @@ + o Major bugfixes (directory authority) + - Fix a crash in parsing router descriptors containing IPv6 + addresses. Bugfix on 0.2.1.3-alpha. diff --git a/src/or/policies.c b/src/or/policies.c index 38c2f7c0fd..e48f42058f 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -888,6 +888,8 @@ exit_policy_is_general_exit_helper(smartlist_t *policy, int port) memset(subnet_status, 0, sizeof(subnet_status)); SMARTLIST_FOREACH(policy, addr_policy_t *, p, { + if (tor_addr_family(&p->addr) != AF_INET) + continue; /* IPv4 only for now */ if (p->prt_min > port || p->prt_max < port) continue; /* Doesn't cover our port. */ mask = 0; |