[tor-bugs] #4503 [TorDNSEL/TorBEL]: TorBEL does not catch ErrorReply

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Nov 17 16:58:31 UTC 2011


#4503: TorBEL does not catch ErrorReply
-----------------------------+----------------------------------------------
 Reporter:  aagbsn           |          Owner:              
     Type:  defect           |         Status:  needs_review
 Priority:  normal           |      Milestone:              
Component:  TorDNSEL/TorBEL  |        Version:              
 Keywords:                   |         Parent:              
   Points:                   |   Actualpoints:              
-----------------------------+----------------------------------------------
Changes (by aagbsn):

  * status:  new => needs_review


Comment:

 https://github.com/aagbsn/torbel/tree/4503-torbel-does-not-catch-
 errorreply
 {{{
 diff --git a/controller.py b/controller.py
 index fe6dbf7..b94c79e 100644
 --- a/controller.py
 +++ b/controller.py
 @@ -853,6 +853,12 @@ class Controller(TorCtl.EventHandler):
                  except TorCtl.TorCtlClosed:
                      # Bail if we closed.
                      return
 +                except TorCtl.ErrorReply, e:
 +                    # We can receive "552 Unknown stream" if Tor pukes on
 the stream
 +                    # before we actually receive the event and use it.
 +                    log.error("(%s, %d): Error attaching stream!",
 +                              router.nickname, event.target_port)
 +                    return

                  if narrow:
                      self.narrow(stream.router, event.target_port)
 }}}

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


More information about the tor-bugs mailing list