[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] Fix the router_compare_to_my_exit_policy assertion failure ...



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv8641/src/or

Modified Files:
	router.c 
Log Message:
Fix the router_compare_to_my_exit_policy assertion failure once-and-for-all, by declaring 0.0.0.0 always denied.

Index: router.c
===================================================================
RCS file: /home/or/cvsroot/src/or/router.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- router.c	4 Jul 2004 22:48:11 -0000	1.59
+++ router.c	7 Jul 2004 19:49:48 -0000	1.60
@@ -381,8 +381,13 @@
 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);