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

[or-cvs] Backport router_compare_to_my_exit_policy fix to maint branch



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

Modified Files:
      Tag: tor-0_0_7-patches
	router.c 
Log Message:
Backport router_compare_to_my_exit_policy fix to maint branch

Index: router.c
===================================================================
RCS file: /home/or/cvsroot/src/or/router.c,v
retrieving revision 1.47
retrieving revision 1.47.2.1
diff -u -d -r1.47 -r1.47.2.1
--- router.c	5 Jun 2004 01:56:54 -0000	1.47
+++ router.c	7 Jul 2004 19:56:19 -0000	1.47.2.1
@@ -373,8 +373,11 @@
 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);