Backport router_compare_to_my_exit_policy fix to maint branch

svn:r2019
This commit is contained in:
Nick Mathewson
2004-07-07 19:56:19 +00:00
parent 182ce239c1
commit ac256363ac
+5 -2
View File
@@ -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);