aboutsummaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-08-27 16:03:48 -0400
committerNick Mathewson <nickm@torproject.org>2012-08-27 16:03:48 -0400
commit1c30e6abc93fa086a14d01d838066581a3657285 (patch)
tree8cdad342a8ce81ded6a606a28585b343520689e5 /src/or/policies.c
parentd48cebc5e498b0ae673635f40fc57cdddab45d5b (diff)
parent62d96284f7e0f81c40d5df7e53dd7b4dfe7e56a5 (diff)
downloadtor-1c30e6abc93fa086a14d01d838066581a3657285.tar.gz
tor-1c30e6abc93fa086a14d01d838066581a3657285.zip
Merge branch 'bug6690_022' into maint-0.2.2
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index c87036013d..55d08afc81 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -685,7 +685,11 @@ compare_tor_addr_to_addr_policy(const tor_addr_t *addr, uint16_t port,
/* no policy? accept all. */
return ADDR_POLICY_ACCEPTED;
} else if (tor_addr_is_null(addr)) {
- tor_assert(port != 0);
+ if (port == 0) {
+ log_info(LD_BUG, "Rejecting null address with 0 port (family %d)",
+ addr ? tor_addr_family(addr) : -1);
+ return ADDR_POLICY_REJECTED;
+ }
return compare_unknown_tor_addr_to_addr_policy(port, policy);
} else if (port == 0) {
return compare_known_tor_addr_to_addr_policy_noport(addr, policy);