summaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 93cae768e9..40e5277478 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -689,7 +689,7 @@ compare_tor_addr_to_addr_policy(const tor_addr_t *addr, uint16_t port,
if (!policy) {
/* no policy? accept all. */
return ADDR_POLICY_ACCEPTED;
- } else if (tor_addr_is_null(addr)) {
+ } else if (addr == NULL || tor_addr_is_null(addr)) {
tor_assert(port != 0);
return compare_unknown_tor_addr_to_addr_policy(port, policy);
} else if (port == 0) {
@@ -1461,17 +1461,6 @@ short_policy_is_reject_star(const short_policy_t *policy)
* <b>node</b>. See compare_tor_addr_to_addr_policy for details on addr/port
* interpretation. */
addr_policy_result_t
-compare_addr_to_node_policy(uint32_t addr, uint16_t port, const node_t *node)
-{
- tor_addr_t a;
- tor_addr_from_ipv4h(&a, addr);
- return compare_tor_addr_to_node_policy(&a, port, node);
-}
-
-/** Decides whether addr:port is probably or definitely accepted or rejcted by
- * <b>node</b>. See compare_tor_addr_to_addr_policy for details on addr/port
- * interpretation. */
-addr_policy_result_t
compare_tor_addr_to_node_policy(const tor_addr_t *addr, uint16_t port,
const node_t *node)
{