From ac256363ac3e91e2f8ba0f3844db5bbaa487a330 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 7 Jul 2004 19:56:19 +0000 Subject: [PATCH] Backport router_compare_to_my_exit_policy fix to maint branch svn:r2019 --- branches/tor-0_0_7-patches/src/or/router.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/branches/tor-0_0_7-patches/src/or/router.c b/branches/tor-0_0_7-patches/src/or/router.c index d186ce5a06..4cb4b72c18 100644 --- a/branches/tor-0_0_7-patches/src/or/router.c +++ b/branches/tor-0_0_7-patches/src/or/router.c @@ -373,8 +373,11 @@ static void router_add_exit_policy_from_config(routerinfo_t *router) { int router_compare_to_my_exit_policy(connection_t *conn) { tor_assert(desc_routerinfo); - tor_assert(conn->addr); /* make sure it's resolved to something. this - way we can't get a 'maybe' below. */ + + /* make sure it's resolved to something. this way we can't get a + 'maybe' below. */ + if (!conn->addr) + return -1; return router_compare_addr_to_exit_policy(conn->addr, conn->port, desc_routerinfo->exit_policy);