Opened 4 months ago

Closed 6 weeks ago

#31189 closed defect (fixed)

potential docs update needed for GuardLifetime?

Reported by: cypherpunks Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: docs, uardlifetime, 042-should BugSmashFund dgoulet-merge
Cc: Actual Points: .1
Parent ID: Points:
Reviewer: asn Sponsor:

Description

The documentation for the GuardLifetime torrc option says:

If nonzero, and UseEntryGuards is set, minimum time to keep a guard before
    picking a new one. If zero, we use the GuardLifetime parameter from the
    consensus directory.  No value here may  be less than 1 month or greater
    than 5 years; out-of-range values are clamped. (Default: 0)

In commit hash 385602e9826e79dbf0d8b51abfd925e59f275708 it appears that there was a behavior change which allows guard lifetimes of 1 day or greater (grep for get_options()->GuardLifetime >= 86400). git blame indicated the docs for the GuardLifetime option haven't been touched in 6-7 years, so I think they need an update after this change.

Is the expected behavior that setting UseEntryGuards 1 and GuardLifetime 1 day will result in guards being used for no longer than one day?

Child Tickets

Change History (9)

comment:1 Changed 4 months ago by nickm

Milestone: Tor: 0.4.2.x-final

comment:2 Changed 4 months ago by nickm

Is the expected behavior that setting UseEntryGuards 1 and GuardLifetime 1 day will result in guards being used for no longer than one day?

It's a little more complicated than that, but I think that's approximately right. (See guard-spec.txt for the full details.)

comment:3 Changed 2 months ago by nickm

Keywords: 042-should added

comment:4 Changed 7 weeks ago by ahf

Owner: set to nickm
Status: newassigned

Distributing 0.4.2 tickets between network team members.

comment:5 Changed 7 weeks ago by nickm

Actual Points: .1
Keywords: BugSmashFund added
Status: assignedneeds_review

Is the expected behavior that setting UseEntryGuards 1 and GuardLifetime 1 day will result in guards being used for no longer than one day?

To be pedantic: if GuardLifetime 1 day is set, then guards will be removed from the list of sampled guards 1 day after they are sampled from the directory, or 1 day after they are confirmed (first used for a good circuit) -- whichever comes first.

Note that nothing prevents a guard from being re-sampled immediately after it is removed: this is intentional, since behaving otherwise would be less random.

It may be that we allow the interval for sampled, unconfirmed guards to be configured independently from the interval for confirmed guards. That's a different ticket, though, and we'd have to consider it for 0.4.3.

I've got a documentation fix against maint-0.3.5 in branch ticket31189_035 with PR at https://github.com/torproject/tor/pull/1381 . It is documentation-only, and merges cleanly to master.

comment:6 Changed 7 weeks ago by asn

Reviewer: asn

comment:7 Changed 6 weeks ago by asn

Status: needs_reviewmerge_ready

LGTM!

comment:8 Changed 6 weeks ago by nickm

Keywords: dgoulet-merge added

comment:9 Changed 6 weeks ago by dgoulet

Keywords: uardlifetime added; guardlifetime removed
Resolution: fixed
Status: merge_readyclosed

Merged! I see no backport.

Note: See TracTickets for help on using tickets.