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

[or-cvs] bugfix in config_cmp_addr_policies() -- we were treating a ...



Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	config.c 
Log Message:
bugfix in config_cmp_addr_policies() -- we were treating a pair
of exit policies if they were equal even if one said accept and
the other said reject.


Index: config.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.500
retrieving revision 1.501
diff -u -p -d -r1.500 -r1.501
--- config.c	11 Feb 2006 21:56:03 -0000	1.500
+++ config.c	11 Feb 2006 23:47:24 -0000	1.501
@@ -3111,6 +3111,8 @@ config_cmp_addr_policies(addr_policy_t *
 {
   int r;
   while (a && b) {
+    if ((r=((int)a->policy_type - (int)b->policy_type)))
+      return r;
     if ((r=((int)a->addr - (int)b->addr)))
       return r;
     if ((r=((int)a->msk - (int)b->msk)))