diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-07-07 19:49:48 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-07-07 19:49:48 +0000 |
commit | e9d81d873b3b13566dea7482a457075c519742b3 (patch) | |
tree | b1481acfad2e15a6ad2166dd9ae97ac71eed5c1d | |
parent | 88451ce25b481574b7f5f076ee03c1dfe69696ac (diff) | |
download | tor-e9d81d873b3b13566dea7482a457075c519742b3.tar tor-e9d81d873b3b13566dea7482a457075c519742b3.tar.gz |
Fix the router_compare_to_my_exit_policy assertion failure once-and-for-all, by declaring 0.0.0.0 always denied.
svn:r2017
-rw-r--r-- | src/or/router.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c index 523abb577..9e36009b8 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -381,8 +381,13 @@ 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; + + tor_assert(conn->addr); return router_compare_addr_to_exit_policy(conn->addr, conn->port, desc_routerinfo->exit_policy); |