Opened 6 years ago

Closed 3 years ago

#12204 closed defect (worksforme)

Revisit flags passed to entry_is_live() around entrynodes.c

Reported by: asn Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-guard
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


It seems that we are almost always passing need_capacity=True to entry_is_live().

The only case where we don't, is in choose_random_entry_impl() where we actually pick an entry guard. In that case, we pass whatever cpath_build_state_t.need_capacity is set to (which makes sense).

However, in other calls, like the one at entry_guard_register_connect_status(), we always call entry_is_live() with need_capacity set to true. Is this needed?

In entry_guard_register_connect_status(), if we just connected for the first time to a new guard, we re-activate all the previous live guards since it might be a sign that our network was down and it just came back up. However, since entry_is_live() is used with need_capacity we only reactivate the Fast guards.

However, as I understand it, there is no requirement that guards need to be Fast. So it might be the case, that if our primary guard is not fast, we don't reactivate it.

Child Tickets

Change History (7)

comment:1 Changed 6 years ago by asn

It seems that the bandwidth weights are so that all Guards are also Fast relays. So the above doesn't matter that much; still it might be good to fix.

$ grep -e '^s.*Guard' cached-consensus  | wc -l
$ grep -e '^s.*Fast.*Guard' cached-consensus  | wc -l

comment:2 Changed 6 years ago by asn

Milestone: Tor: 0.2.6.x-final
Priority: normalminor

comment:3 Changed 6 years ago by asn

Milestone: Tor: 0.2.6.x-finalTor: 0.2.???

Downgrading to the ?? milestone because of low importance.

comment:4 Changed 4 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:5 Changed 4 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:6 Changed 3 years ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:7 Changed 3 years ago by nickm

Resolution: worksforme
Severity: Normal
Status: newclosed

entry_is_live is dead as of the prop271 merge in 0.2.9.

Note: See TracTickets for help on using tickets.