[tor-bugs] #6951 [Stem]: Implement a wrapper method for MAPADDRESS requests

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon Sep 24 16:07:43 UTC 2012


#6951: Implement a wrapper method for MAPADDRESS requests
----------------------------+-----------------------------------------------
    Reporter:  neena        |       Owner:  neena 
        Type:  task         |      Status:  closed
    Priority:  normal       |   Milestone:        
   Component:  Stem         |     Version:        
  Resolution:  implemented  |    Keywords:        
      Parent:               |      Points:        
Actualpoints:               |  
----------------------------+-----------------------------------------------
Changes (by atagar):

  * status:  needs_review => closed
  * resolution:  => implemented


Comment:

 Thanks! Pushed.

 > ImportError: No module named utils

 When moving a module it's a good idea to rm the pyc file, otherwise python
 will keep happily running the code that no longer exists.

 > Hmm, isn't this 1111?

 Oops! I confused it with the test prompt port which is 2779 (I should
 probably bring that into this range too...).

 > AFAIK pass is the standard way to say "If there's any problem while
 running this code, don't bother doing anything about it".

 Right, if you don't want a block to do anything then 'pass' is the right
 keyword. However, the comment above says...

 > :returns: externally visible IP address, or None if it isn't able to

 ... that's why I suggested explicitely returning None.

 > +      stem.util.connection.is_valid_ip_address(ip_addr)

 This returns a boolean so we need this to be in an assertTrue.

 > That's odd. Is this happening intermittently? or every time?
 > Is it just on my mapaddress-foo branch? Or on master?

 It seems to be consistent, and was happening with master too. Happy to
 discuss this more either here or on a separate ticket. My guess is that
 the CONTROLLER purpose was added in a later tor version. I'm testing with
 tor 0.2.1.30 specifically because it's old and hence able to catch this
 sort of compatability issue. When I run with tor 0.2.3.16 the issue
 doesn't manifest.

 Here's the requested output...

 {{{
 atagar at morrigan:~/Desktop/stem$ telnet localhost 2779
 Trying 127.0.0.1...
 Connected to localhost.
 Escape character is '^]'.
 AUTHENTICATE
 250 OK

 GETINFO circuit-status
 250+circuit-status=
 35 BUILT
 $7EE9EF01F507BB1942CA74F723688AF0E2220F42,PolPotsOptometry,yetiOnIce
 PURPOSE=GENERAL
 34 BUILT
 $7EE9EF01F507BB1942CA74F723688AF0E2220F42,$6557396CF0EE5B72563A22BCAA0FF26E77FA3D08,t00lhav3n
 PURPOSE=GENERAL
 33 BUILT
 $16404C671C6503F2C7D9A072DF065EAF9FE7AAF3,$6557396CF0EE5B72563A22BCAA0FF26E77FA3D08,$906C3E72D7D9CD4998CB7596D34CE415B8927B15
 PURPOSE=GENERAL
 32 BUILT ergebnisoffen,chaoscomputerclub19,assk PURPOSE=GENERAL
 .
 250 OK

 SETCIRCUITPURPOSE 32 PURPOSE=CONTROLLER
 552 Unknown purpose "PURPOSE=CONTROLLER"
 }}}

 Cheers! -Damian

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


More information about the tor-bugs mailing list