diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2023-02-09 01:43:14 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2023-04-06 15:57:10 +0000 |
commit | a4ee0c29ee52052f82692f0825a50e1a55e01e5c (patch) | |
tree | 52b4dd63d020eff43e276c9c74aff548f3e33ee9 /src/feature | |
parent | cf715a56f1e4c6873d2e99bdd96c4b1fb86af63d (diff) | |
download | tor-a4ee0c29ee52052f82692f0825a50e1a55e01e5c.tar.gz tor-a4ee0c29ee52052f82692f0825a50e1a55e01e5c.zip |
Prop#329: Add purposes for conflux circuits
Because UNLINKED circuits must never be used for streams, but LINKED circuits
can be, we want these separate.
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/client/circpathbias.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/feature/client/circpathbias.c b/src/feature/client/circpathbias.c index ff9e05a645..144a53c972 100644 --- a/src/feature/client/circpathbias.c +++ b/src/feature/client/circpathbias.c @@ -334,12 +334,23 @@ pathbias_should_count(origin_circuit_t *circ) * endpoint could be chosen maliciously. * Similarly, we can't count client-side intro attempts, * because clients can be manipulated into connecting to - * malicious intro points. */ + * malicious intro points. + * + * Finally, avoid counting conflux circuits for now, because + * a malicious exit could cause us to reconnect and blame + * our guard... + * + * TODO-329-PURPOSE: This is not quite right, we could + * instead avoid sending usable probes on conflux circs, + * and count only linked circs as failures, but it is + * not 100% clear that would result in accurate counts. */ if (get_options()->UseEntryGuards == 0 || circ->base_.purpose == CIRCUIT_PURPOSE_TESTING || circ->base_.purpose == CIRCUIT_PURPOSE_CONTROLLER || circ->base_.purpose == CIRCUIT_PURPOSE_S_CONNECT_REND || circ->base_.purpose == CIRCUIT_PURPOSE_S_REND_JOINED || + circ->base_.purpose == CIRCUIT_PURPOSE_CONFLUX_UNLINKED || + circ->base_.purpose == CIRCUIT_PURPOSE_CONFLUX_LINKED || (circ->base_.purpose >= CIRCUIT_PURPOSE_C_INTRODUCING && circ->base_.purpose <= CIRCUIT_PURPOSE_C_INTRODUCE_ACKED)) { |