#22136 closed defect (duplicate)

Make entry relays expire idle client and bridge connections

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: mikeperry Actual Points:
Parent ID: #22805 Points: 0.3
Reviewer: Sponsor: Sponsor4-can

Description

This is a follow-up to #21406.

Now that channel_is_client() works, we should use it instead of or_circuit_t.is_first_hop.

This will make circuit_expire_old_circuits_serverside() actually expire circuits correctly.

The rest of the changes are logging or refactoring, the checks are either correct, or have no impact. (In connection_exit_begin_conn(), we will change an end reason from MISC to TORPROTOCOL.)

Child Tickets

Change History (5)

comment:1 Changed 13 months ago by teor

Cc: mikeperry added
Milestone: Tor: 0.3.2.x-finalTor: 0.3.1.x-final
Parent ID: #22805

Mike, does this bug affect the relay padding implementation?

It causes entry nodes to treat most client circuits like relay circuits when calculating expiry. It might mean we add padding to idle client circuits, rather than closing them.

comment:2 Changed 12 months ago by mikeperry

Well, the padding code tries to set connection lifetimes on the order of an hour by controlling idle circuit lifetime. It tries to ensure that you always have some kind of circuit open for around 30-60 minutes, even if the client is idle. After that point, it stops holding circuits open or building new ones, and then a few minutes after that, the client should close the orconn itself.

So this bug should only affect padding overhead if there are buggy clients (or alternate client implementations) that do not close their own idle circuits and orconns.

comment:3 in reply to:  2 Changed 12 months ago by teor

Milestone: Tor: 0.3.1.x-finalTor: 0.3.2.x-final
Sponsor: Sponsor4-can
Summary: Make guards expire client connectionsMake entry relays expire idle client and bridge connections

Replying to mikeperry:

Well, the padding code tries to set connection lifetimes on the order of an hour by controlling idle circuit lifetime. It tries to ensure that you always have some kind of circuit open for around 30-60 minutes, even if the client is idle. After that point, it stops holding circuits open or building new ones, and then a few minutes after that, the client should close the orconn itself.

So this bug should only affect padding overhead if there are buggy clients (or alternate client implementations) that do not close their own idle circuits and orconns.

So this bug would mainly affect bridges, which delay closing their own idle orconns (because they think they are relays connected to another relay). This is probably ok.

But there are a lot of idle bridges, so fixing this bug might help reduce network load.

comment:4 Changed 11 months ago by nickm

The patch on the parent ticket makes us look at channel_is_client.

comment:5 Changed 11 months ago by nickm

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.