[tor-bugs] #17873 [Tor]: replacing 0.0.0.0 listeners at runtime fails

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 6 14:09:23 UTC 2016


#17873: replacing 0.0.0.0 listeners at runtime fails
-------------------------+------------------------------------
 Reporter:  cypherpunks  |          Owner:
     Type:  defect       |         Status:  new
 Priority:  Medium       |      Milestone:  Tor: 0.2.8.x-final
Component:  Tor          |        Version:
 Severity:  Normal       |     Resolution:
 Keywords:  easy         |  Actual Points:
Parent ID:               |         Points:
  Sponsor:               |
-------------------------+------------------------------------

Comment (by teor):

 One way to do this patch:

 In retry_all_listeners/retry_listener_ports we match up old and new
 sockets that have the same address and port, and leave them alone.

 Then we open any new sockets that weren't already open.
 Then we close any old sockets that no logner need to be open.

 This doesn't work if one of the addresses is 0.0.0.0 or [::], and the
 other is not - those addresses don't match (there needs to be a
 close/open), but they do conflict (we can't do the open first).

 So, if either of the addresses for a *Port is 0.0.0.0 or [::], and the
 port numbers match, we need to close the old port first, then open the new
 port.

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


More information about the tor-bugs mailing list