[tor-bugs] #3291 [Pluggable transport]: obfs2 should wait before closing connection on wrong magic/plength

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon May 30 01:48:46 UTC 2011


#3291: obfs2 should wait before closing connection on wrong magic/plength
---------------------------------+------------------------------------------
 Reporter:  asn                  |          Owner:  asn         
     Type:  defect               |         Status:  needs_review
 Priority:  normal               |      Milestone:              
Component:  Pluggable transport  |        Version:              
 Keywords:                       |         Parent:              
   Points:                       |   Actualpoints:              
---------------------------------+------------------------------------------

Comment(by nickm):

 As noted, RECV_OBFS2_PENDING should probably be called RECV_SEND_PENDING
 or something.  It's something that other protocols can return too, right?

 C tip: the cast here is redundant:
 {{{
 +  if (evbuffer_add_buffer(dest,source)<0)
 +    return (enum recv_ret) RECV_BAD;
 +  else
 +    return (enum recv_ret) RECV_GOOD;
 }}}
 RECV_BAD and RECV_GOOD are already of the type you need, and adding extra
 casts makes it look like you're doing something dangerous when really it's
 all good.

 The comment on obfs2_recv is now wrong.

 The RECV_BAD_WAIT patch makes no sense to me.  What is it for?  Why can't
 we just close the connection?

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


More information about the tor-bugs mailing list