[tor-bugs] #5374 [Tor Relay]: getsockname() to check for address change failed

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu May 24 21:06:22 UTC 2012


#5374: getsockname() to check for address change failed
-----------------------+----------------------------------------------------
 Reporter:  funkstar   |          Owner:                     
     Type:  defect     |         Status:  needs_review       
 Priority:  major      |      Milestone:  Tor: 0.2.2.x-final 
Component:  Tor Relay  |        Version:  Tor: 0.2.3.12-alpha
 Keywords:             |         Parent:                     
   Points:             |   Actualpoints:                     
-----------------------+----------------------------------------------------

Comment(by nickm):

 To see whether I'm right about the cause, I've attached a short test
 program "gsa.c".  You can build it with mingw using "gcc -Wall gsa.c
 -lws2_32 -o gsa.exe".  To run it, try doing "./gsa.exe" and then
 "./gsa.exe 1".  The first time, it will try a nonblocking socket.  The
 second time, it will try a blocking socket.

 For me, on XP, using a nonblocking socket, it reports my address as 0x0.
 Using a blocking socket, it reports my address correctly.  Notably, if I
 insert a one second delay between the connect() and the getsockname(), the
 blocking case works too... so I'm pretty sure that's what the problem is
 on XP.

 Let's see if the win 8 problem is the same.  Shandoit is going to try to
 run it, but doesn't currently have a win8 installation, so it might take a
 little while for an answer there.  If you've got a win8 installation and a
 C compiler, you might want to give it a shot.

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


More information about the tor-bugs mailing list