diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-08-27 16:09:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-08-27 16:09:29 -0400 |
commit | e232938ec82c8c35b99331995d1aeaca67ba9ec1 (patch) | |
tree | b23d0fc0f3eef5cd0460e37b26506c0e94b24f43 /src/or/policies.c | |
parent | 0ccd57f0f247171d43e325d29bfcc102d877ca1c (diff) | |
parent | 443e4ae1ee0520cead27dd3a21e9f79b1bed8f8b (diff) | |
download | tor-e232938ec82c8c35b99331995d1aeaca67ba9ec1.tar.gz tor-e232938ec82c8c35b99331995d1aeaca67ba9ec1.zip |
Merge remote-tracking branch 'origin/maint-0.2.3'
Diffstat (limited to 'src/or/policies.c')
-rw-r--r-- | src/or/policies.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/policies.c b/src/or/policies.c index 798bb846fa..568bc88a05 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -712,7 +712,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 (addr == NULL || 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); |