aboutsummaryrefslogtreecommitdiff
path: root/src/or/channeltls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-07-23 11:52:10 +0200
committerAndrea Shepard <andrea@torproject.org>2013-07-23 05:16:56 -0700
commit5d4b5018be5d85162d96cc3781acbf892f33bc21 (patch)
treecdac1c31e46962cc02a953fd6ca8980c28865ee6 /src/or/channeltls.c
parent2920d670debaaa7a306bedd5fd7ce9c3e72124e6 (diff)
downloadtor-5d4b5018be5d85162d96cc3781acbf892f33bc21.tar.gz
tor-5d4b5018be5d85162d96cc3781acbf892f33bc21.zip
Fix bug9309, and n_noncanonical count/continue code
When we moved channel_matches_target_addr_for_extend() into a separate function, its sense was inverted from what one might expect, and we didn't have a ! in one place where we should have. Found by skruffy.
Diffstat (limited to 'src/or/channeltls.c')
-rw-r--r--src/or/channeltls.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index 60693daeb2..d758d22d82 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -546,7 +546,7 @@ channel_tls_matches_extend_info_method(channel_t *chan,
}
/**
- * Check if we match a target address
+ * Check if we match a target address; return true iff we do.
*
* This implements the matches_target method for channel_tls t_; the upper
* layer wants to know if this channel matches a target address when extending
@@ -563,8 +563,7 @@ channel_tls_matches_target_method(channel_t *chan,
tor_assert(target);
tor_assert(tlschan->conn);
- return tor_addr_compare(&(tlschan->conn->real_addr),
- target, CMP_EXACT);
+ return tor_addr_eq(&(tlschan->conn->real_addr), target);
}
/**