[tor-bugs] #4760 [Tor Bridge]: "ORPort [::]:9001" sometimes listens to both IPv4 and IPv6, sometimes to IPv4 only.

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Dec 22 14:01:41 UTC 2011


#4760: "ORPort [::]:9001" sometimes listens to both IPv4 and IPv6, sometimes to
IPv4 only.
-------------------------+--------------------------------------------------
 Reporter:  dcf          |          Owner:                     
     Type:  enhancement  |         Status:  new                
 Priority:  normal       |      Milestone:                     
Component:  Tor Bridge   |        Version:  Tor: 0.2.3.10-alpha
 Keywords:               |         Parent:                     
   Points:               |   Actualpoints:                     
-------------------------+--------------------------------------------------
 On some operating systems, an AF_INET6 socket listening on :: can also
 receive IPv4 connections, but whether it does by default is OS-dependent.
 It depends whether the IPV6_V6ONLY socket option is set.

 You may want to set this socket option on all sockets resulting from an
 IPv6 Bridge line, for uniformity and to avoid accidentally listening on
 IPv4 when you don't intend to. Linux by default has this option set;
 Windows and FreeBSD apparently do not.

 An observable effect of this phenomenon is that this configuration fails
 on Linux:
 {{{
 ORPort 9001
 ORPort [::]:9001
 }}}
 The problem is that "ORPort 9001" binds to IPv4, and "ORPort [::]:9001"
 tries to bind to both IPv4 and IPv6.
 {{{
 Dec 22 05:58:48.104 [notice] Opening Socks listener on 127.0.0.1:9050
 Dec 22 05:58:48.104 [notice] Opening OR listener on 0.0.0.0:9001
 Dec 22 05:58:48.104 [notice] Opening OR listener on :::9001
 Dec 22 05:58:48.104 [warn] Could not bind to :::9001: Address already in
 use. Is Tor already running?
 Dec 22 05:58:48.104 [notice] Closing partially-constructed listener Socks
 listener on 127.0.0.1:9050
 Dec 22 05:58:48.104 [notice] Closing partially-constructed listener OR
 listener on 0.0.0.0:9001
 Dec 22 05:58:48.104 [warn] Failed to parse/validate config: Failed to bind
 one of the listener ports.
 Dec 22 05:58:48.104 [err] Reading config failed--see warnings above.
 }}}

 http://tools.ietf.org/html/rfc3493#section-5.3 describes the IPV6_V6ONLY
 option.

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


More information about the tor-bugs mailing list