-
- Downloads
Launch sufficient circuits to satisfy pending isolated streams
Our old "do we need to launch a circuit for stream S" logic was, more or less, that if we had a pending circuit that could handle S, we didn't need to launch a new one. But now that we have streams isolated from one another, we need something stronger here: It's possible that some pending C can handle either S1 or S2, but not both. This patch reuses the existing isolation logic for a simple solution: when we decide during circuit launching that some pending C would satisfy stream S1, we "hypothetically" mark C as though S1 had been connected to it. Now if S2 is incompatible with S1, it won't be something that can attach to C, and so we'll launch a new stream. When the circuit becomes OPEN for the first time (with no streams attached to it), we reset the circuit's isolation status. I'm not too sure about this part: I wanted some way to be sure that, if all streams that would have used a circuit die before the circuit is done, the circuit can still get used. But I worry that this approach could also lead to us launching too many circuits. Careful thought needed here.
Showing
- src/or/circuitlist.c 16 additions, 2 deletionssrc/or/circuitlist.c
- src/or/circuituse.c 11 additions, 2 deletionssrc/or/circuituse.c
- src/or/connection_edge.c 35 additions, 0 deletionssrc/or/connection_edge.c
- src/or/connection_edge.h 1 addition, 0 deletionssrc/or/connection_edge.h
- src/or/or.h 19 additions, 5 deletionssrc/or/or.h
Loading
Please register or sign in to comment