[tor-bugs] #17638 [Tor]: Make ersatz_socketpair work on IPv6-only systems:

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Nov 27 17:46:18 UTC 2015


#17638: Make ersatz_socketpair work on IPv6-only systems:
-----------------------------------------+---------------------------------
 Reporter:  teor                         |          Owner:
     Type:  defect                       |         Status:  closed
 Priority:  Medium                       |      Milestone:  Tor:
Component:  Tor                          |  0.2.8.x-final
 Severity:  Normal                       |        Version:  Tor:
 Keywords:  easy ipv6 TorCoreTeam201511  |  unspecified
Parent ID:                               |     Resolution:  fixed
  Sponsor:                               |  Actual Points:
                                         |         Points:
-----------------------------------------+---------------------------------

Comment (by cypherpunks):

 Replying to [comment:5 nickm]:
 > For 0001, why not just change the type to uint16_t ?  Did that in
 a45aacd2e292ea0522313e430e5ff8c70fadf8f7.
 I used tor_addr_port_t because tor_port_t does not exist and it felt like
 the next best thing. But your solution works too (and it makes the diff
 smaller).


 > The patch 0002 adds a signed/unsigned comparison on systems where
 socklen_t is _unsigned_.  Tried a different approach as
 f108be7c2556de20dc34c0a8ad52b19c363febbd.
 Your solution is better because it avoids my ugly casts.

 > Also, I really don't like jamming this stuff into a sockaddr;
 sockaddr_storage is the one that's guaranteed to work.  Tried to fix that
 in eedef419445098dbce1b25e782bbe023bc659902.
 Totally missed that. Nice find.

 > Please reopen if I messed up.
 Jenkins seems to be happy now.

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


More information about the tor-bugs mailing list