[or-cvs] Only v1 authorities get hidden service descriptors with cur...

Nick Mathewson nickm at seul.org
Mon Feb 6 04:56:20 UTC 2006


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv4318/src/or

Modified Files:
	directory.c 
Log Message:
Only v1 authorities get hidden service descriptors with current protocol

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/directory.c,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -p -d -r1.348 -r1.349
--- directory.c	5 Feb 2006 03:23:16 -0000	1.348
+++ directory.c	6 Feb 2006 04:56:18 -0000	1.349
@@ -131,15 +131,20 @@ directory_post_to_dirservers(uint8_t pur
 {
   smartlist_t *dirservers;
   int post_via_tor;
+  int post_to_v1_only;
 
   router_get_trusted_dir_servers(&dirservers);
   tor_assert(dirservers);
+  /* Only old dirservers handle rendezvous descriptor publishing. */
+  post_to_v1_only = (purpose == DIR_PURPOSE_UPLOAD_RENDDESC);
   /* This tries dirservers which we believe to be down, but ultimately, that's
    * harmless, and we may as well err on the side of getting things uploaded.
    */
   SMARTLIST_FOREACH(dirservers, trusted_dir_server_t *, ds,
     {
       routerstatus_t *rs = &(ds->fake_status);
+      if (post_to_v1_only && !ds->is_v1_authority)
+        continue;
       post_via_tor = purpose_is_private(purpose) ||
                      !fascist_firewall_allows_address(ds->addr,ds->dir_port);
       directory_initiate_command_routerstatus(rs, purpose, post_via_tor,



More information about the tor-commits mailing list