Opened 14 years ago

Last modified 8 years ago

#288 closed defect (Fixed)

'resetconf ORPort' does not close the listener

Reported by: edmanm Owned by:
Priority: Very Low Milestone:
Component: Core Tor/Tor Version:
Severity: Keywords:
Cc: edmanm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Sending a "RESETCONF ORPort" to Tor does not close the OR listener; however, sending
a "RESETCONF DirPort" does close the Dir listener.

Before doing anything:
[edmanm@adrastea:~]$ netstat -ant | grep "9001.*LISTEN\|9030.*LISTEN"
tcp4 0 0 *.9030 *.* LISTEN
tcp4 0 0 *.9001 *.* LISTEN

Closing the DirPort:
getconf dirport
250 DirPort=9030
resetconf dirport
250 OK
getconf dirport
250 DirPort=0

Apr 26 21:28:03:818 [Notice] retry_listeners(): Closing Directory listener on
Apr 26 21:28:03:821 [Notice] options_act_reversible(): Closing old Directory listener on

[edmanm@adrastea:~]$ netstat -ant | grep "9001.*LISTEN\|9030.*LISTEN"
tcp4 0 0 *.9001 *.* LISTEN

Closing the ORPort:
getconf orport
250 ORPort=9001
resetconf orport
250 OK
getconf orport
250 ORPort=0

[edmanm@adrastea:~]$ netstat -ant | grep "9001.*LISTEN\|9030.*LISTEN"
tcp4 0 0 *.9001 *.* LISTEN

The DirPort was successfully closed, but the ORPort was not even though we got a 250 OK. Nothing
was printed in the log.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (5)

comment:1 Changed 14 years ago by edmanm

This is on

comment:2 Changed 14 years ago by arma

This happens because retry_all_listeners() in connection.c has a line:

if (server_mode(options) &&

The goal of this line is to not open OR connections if we've set ClientOnly,
but the side-effect is that we don't close OR connections if there aren't
any we'll open.

I'll fix this when I'm less feverish, or Nick says he might.

comment:3 Changed 14 years ago by arma

I believe I've fixed it, in the release. Please re-open if I haven't.

comment:4 Changed 14 years ago by arma

flyspray2trac: bug closed.

comment:5 Changed 8 years ago by nickm

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