[tor-bugs] #1240 [Tor Relay]: stop calling getsockname if accept returns a bad address

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Mon Dec 19 21:52:01 UTC 2011

#1240: stop calling getsockname if accept returns a bad address
 Reporter:  Sebastian           |           Type:  defect   
   Status:  needs_review        |       Priority:  minor    
Milestone:  Tor: 0.2.2.x-final  |      Component:  Tor Relay
  Version:            |     Resolution:           
 Keywords:                      |         Parent:           
   Points:                      |   Actualpoints:           

Comment(by asn):

 Replying to [comment:5 nickm]:
 > Please review branch bug1240 in my public repo.  (The original patch
 from r1eo does not seem to have survived the flyspray->trac migration.)
 > This also fixes #4545 and #4547.

 For all I know about networking, the code simplification looks sane.
 Someone who knows more networks than me should look at it too.

 Bikeshedding away, I would replace all the 'nmap' references to 'client
 sends RST before accept()', since it's not nmap-specific. And maybe
 replace the 'some versions of Linux' comment, with 'some versions of Unix'
 or 'some versions of FreeBSD', since r1eo's link points to freebsd-net.

 Maybe even cut one 'with', off the 'successfully with with socklen 0'

 Also, you forgot:
 -  char addrbuf[256];
 +  char addrbuf[256];2
 in the commit.

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

More information about the tor-bugs mailing list