Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#3936 closed defect (fixed)

Combination of TransPort and TransListenAddress in old syntax misinterpreted

Reported by: fk Owned by:
Priority: High Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version: Tor: 0.2.3.3-alpha
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I've been using the following Tor directives for years:

TransPort 9040
TransListenAddress 10.0.0.2

My interpretation of the Tor 0.2.3.3-alpha ChangeLog
and the man page is that the combination should still
work as before, as this is not a mix of old and new syntax.

The behavior I'm seeing (on FreeBSD 9.0-BETA2) is that Tor
binds to an (apparently) random port and rebinds to another
one about once a minute:

Sep 05 19:53:36.994 [notice] Bootstrapped 100%: Done.
Sep 05 19:54:28.597 [notice] Opening Transparent pf/netfilter listener on 10.0.0.2:0
Sep 05 19:54:28.597 [notice] Transparent pf/netfilter listener listening on port 28693.
Sep 05 19:54:28.598 [notice] Closing no-longer-configured Transparent pf/netfilter listener on 10.0.0.2:50605
Sep 05 19:55:29.598 [notice] Opening Transparent pf/netfilter listener on 10.0.0.2:0
Sep 05 19:55:29.598 [notice] Transparent pf/netfilter listener listening on port 37786.
Sep 05 19:55:29.598 [notice] Closing no-longer-configured Transparent pf/netfilter listener on 10.0.0.2:28693
Sep 05 19:56:30.597 [notice] Opening Transparent pf/netfilter listener on 10.0.0.2:0
Sep 05 19:56:30.597 [notice] Transparent pf/netfilter listener listening on port 35108.
Sep 05 19:56:30.597 [notice] Closing no-longer-configured Transparent pf/netfilter listener on 10.0.0.2:37786
Sep 05 19:57:31.597 [notice] Opening Transparent pf/netfilter listener on 10.0.0.2:0
Sep 05 19:57:31.597 [notice] Transparent pf/netfilter listener listening on port 38142.
Sep 05 19:57:31.597 [notice] Closing no-longer-configured Transparent pf/netfilter listener on 10.0.0.2:35108
Sep 05 19:58:32.597 [notice] Opening Transparent pf/netfilter listener on 10.0.0.2:0
Sep 05 19:58:32.597 [notice] Transparent pf/netfilter listener listening on port 64587.
Sep 05 19:58:32.597 [notice] Closing no-longer-configured Transparent pf/netfilter listener on 10.0.0.2:38142

The shiny-new "TransPort 10.0.0.2:9040" syntax works as expected.

I'm not seeing this problem with:

ControlPort 9051
ControlListenAddress 127.0.0.1

I'm running Tor in a jail, 127.0.0.1 and 10.0.0.2 are
equivalent so the directives above cause Tor to bind
to 10.0.0.2:9051 as intended.

Child Tickets

Attachments (1)

tor-0.2.3.3-alpha-unbreak-foolistenaddress-bug-3936.patch (1.8 KB) - added by fk 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by fk

Same problem using:

TransPort 9040
TransListenAddress 127.0.0.1

comment:2 Changed 8 years ago by arma

Milestone: Tor: 0.2.3.x-final
Priority: minormajor

comment:3 in reply to:  1 Changed 8 years ago by fk

No problem using "TransPort 9040" without specifying the TransListenAddress.

comment:4 Changed 8 years ago by fk

Status: newneeds_review

The attached patch seems to fix it for me.

comment:5 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks good to me; merging. Thanks for tracking this down!

comment:6 Changed 7 years ago by nickm

Keywords: tor-client added

comment:7 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.