[tor-bugs] #2183 [Tor Relay]: router_rebuild_descriptor(): Bug: Couldn't generate extra-info descriptor

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Nov 17 09:51:53 UTC 2010


#2183: router_rebuild_descriptor(): Bug: Couldn't generate extra-info descriptor
-----------------------+----------------------------------------------------
 Reporter:  Falo       |       Owner:  karsten            
     Type:  defect     |      Status:  needs_review       
 Priority:  normal     |   Milestone:                     
Component:  Tor Relay  |     Version:  Tor: 0.2.2.17-alpha
 Keywords:             |      Parent:                     
-----------------------+----------------------------------------------------

Comment(by karsten):

 Replying to [comment:21 nickm]:
 > reviewing "fix2183":
 >
 >   * Probably, we should esc_for_log any descriptors before logging
 them.... but logging them is probably not the best idea anyway, since our
 log buffer truncates after 10024 bytes.

 I took them out.

 >   * No need to change this, but in the future, stuff like taking out
 that "opt " should really get its own commit.

 Ooops. You're right. I changed even more stuff, but then decided it was a
 bad idea and changed it back. This change somehow slipped through.

 >   * I prefer having bridge_stats declared in the only block where it's
 used; there's no real reason to have it at the head of the function.

 Changed. As a Java programmer I prefer to declare variables where I use
 them, but my understanding was that it's good C style to declare variables
 at the top of functions. In general, should I try to move declarations to
 blocks, if possible?

 >   * The definition of SIG_LEN really belongs near the declaration of
 router_append_dirobj_signature(), and wants to be called something more
 like DIROBJ_MAX_SIG_LEN .

 Moved and renamed. I also found another place where 256 bytes were left
 free for a signature, so I changed the value from 250 to 256.

 >   * Rather than dropping all stats when we exceed 50k, would it be at
 all useful to remove elements from the end of the chunks smartlist, one by
 one, until we are under 50k again?

 Done.

 Thanks for your comments! Please see my updated branch fix2183.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2183#comment:22>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list