Opened 2 years ago

Closed 2 years ago

#24128 closed defect (not a bug)

GETCONF doesn't resolve "auto" settings

Reported by: catalyst Owned by:
Priority: Medium Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-control
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Right now tor doesn't resolve auto settings when reporting them via GETCONF. This means the controller might need to know beforehand how tor will behave for any given auto setting, which might change across tor versions or even across consensuses. We should have a way to resolve auto settings so controllers can discover what setting tor will actually use.

Implementing this could be a lot of work because I think the behavior of many auto values gets determined by code in the relevant subsystem rather than in a centralized place like control.c.

Child Tickets

Change History (4)

comment:1 Changed 2 years ago by nickm

Right. It's not clear to me that the GETCONF behavior is even _wrong_ here: the setting is in fact "auto", not something else. Some kind of standard GETINFO mapping for the as-used value of these options might be better?

e.g., I'm thinking of something like:

GETCONF UseMicrodescriptors
250 UseMicrodescriptors=auto
GETINFO config/as-used/UseMicrodescriptors
250 OK

(but I'm not at all attached to the "as-used" name)

comment:2 Changed 2 years ago by arma

Agreed, getconf should tell you the actual setting string for the config option -- if it's auto, then it's auto.

There are indeed a pile of config options which have different behaviors depending on other things. For simple examples, I'm thinking of the ones that disable stuff if something else isn't enabled, e.g.

    if (options->UseEntryGuards) {
      log_info(LD_CONFIG, "Authoritative directory servers can't set "
               "UseEntryGuards. Disabling.");
      options->UseEntryGuards = 0;

I am fine in theory with a getinfo for looking up Tor's "actual" plans for various situations. But we might be wise to make some good plan for bringing order to the config.c chaos first. :)

comment:3 Changed 2 years ago by teor

Sometimes, "auto" means "try both, and choose whatever works". I'm not sure how we represent that.

comment:4 Changed 2 years ago by nickm

Resolution: not a bug
Status: newclosed

Closing as not-a-bug. We could do the getinfo feature at some point in the future, if someone wants to put in the effort.

Note: See TracTickets for help on using tickets.