[tor-bugs] #5083 [Obfsproxy]: Implement heartbeat message in	obfsproxy
    Tor Bug Tracker & Wiki 
    torproject-admin at torproject.org
       
    Sun Feb 12 20:16:43 UTC 2012
    
    
  
#5083: Implement heartbeat message in obfsproxy
-------------------------+--------------------------------------------------
 Reporter:  karsten      |          Owner:  asn         
     Type:  enhancement  |         Status:  needs_review
 Priority:  normal       |      Milestone:              
Component:  Obfsproxy    |        Version:              
 Keywords:               |         Parent:              
   Points:               |   Actualpoints:              
-------------------------+--------------------------------------------------
Changes (by karsten):
  * status:  needs_revision => needs_review
Comment:
 Replying to [comment:7 karsten]:
 > Replying to [comment:6 asn]:
 > > The check
 > > {{{
 > >   p = strrchr(addrport, ':');
 > >   if (p < 0)
 > >     return;
 > > }}}
 > >  in `status_note_connection()` seems wrong. `strrchr()` returns a
 pointer, so `if (!p)` is probably better than `if (p < 0)`. I wonder if we
 should use `strchr()` like `util.c:resolve_address_port()` does; but it
 probably doesn't really matter.
 >
 > Ah, there's the code I was looking for.  I'm going to steal it from
 there.
 Fixed.
 Note that strchr() does the wrong thing here, because it finds the first
 ':' in the string, not the last.  That doesn't work for IPv6 addresses.
 That's a bug in resolve_address_port() in util.c, too!
 > > b) Should we use a hash table or something to query whether a
 connection has been seen before? It seems that `smartlist_string_isin()`
 does a linear search over a smartlist, and some obfsproxy bridge operators
 are currently seeing 1500~ or so unique IPs. I'm not sure if that would
 cause lots of load, but a hash table (I think that's a `strmap_t` in
 `container.c`) might be better.
 >
 > Oh.  You're right.  strmap_t it is.
 Fixed.
 Please see my updated branch heartbeat_uniqueips.
-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5083#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
    
    
More information about the tor-bugs
mailing list