aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-03-06 13:23:02 -0500
committerNick Mathewson <nickm@torproject.org>2011-03-06 13:23:02 -0500
commit07b8b439c4bee7545a26a61160b2860b18b88185 (patch)
tree0450bed147fe85aff52335f46f63c05a28f64c16
parentc6d8e75dc3aafe7b9a658221ac3bcd4a5936ff9b (diff)
parented14888e7e9ffb1877ddb7780b5033314d244fb3 (diff)
downloadtor-07b8b439c4bee7545a26a61160b2860b18b88185.tar.gz
tor-07b8b439c4bee7545a26a61160b2860b18b88185.zip
Merge remote branch 'origin/maint-0.2.2'
-rw-r--r--changes/ipv6_crash3
-rw-r--r--src/or/policies.c2
-rw-r--r--src/or/routerparse.c2
3 files changed, 5 insertions, 2 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 2cf99820b1..6738b484ae 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -901,6 +901,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;
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index d41b91d22e..c20834ab1e 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -266,8 +266,6 @@ typedef struct token_rule_t {
static token_rule_t routerdesc_token_table[] = {
T0N("reject", K_REJECT, ARGS, NO_OBJ ),
T0N("accept", K_ACCEPT, ARGS, NO_OBJ ),
- T0N("reject6", K_REJECT6, ARGS, NO_OBJ ),
- T0N("accept6", K_ACCEPT6, ARGS, NO_OBJ ),
T1_START( "router", K_ROUTER, GE(5), NO_OBJ ),
T1( "signing-key", K_SIGNING_KEY, NO_ARGS, NEED_KEY_1024 ),
T1( "onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024 ),