diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2020-06-09 02:36:45 -0500 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2020-06-16 12:24:29 -0500 |
commit | f697ac58610a74c1cbffd16b39e8e90d1592290f (patch) | |
tree | a6d157e37c419a4f6619aeef60ed36b0a8dfae6d /src/core/or/circuitpadding.h | |
parent | 285dbeefa1b7e827df8dfa4a76a410330345c443 (diff) | |
download | tor-f697ac58610a74c1cbffd16b39e8e90d1592290f.tar.gz tor-f697ac58610a74c1cbffd16b39e8e90d1592290f.zip |
Bug 32040: Add a keep_*_mask to keep circpad machines
Allows us to program machines that stay around after creation if circuit state
or purpose changes.
Diffstat (limited to 'src/core/or/circuitpadding.h')
-rw-r--r-- | src/core/or/circuitpadding.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/or/circuitpadding.h b/src/core/or/circuitpadding.h index 4fadcb742a..3d2929cf74 100644 --- a/src/core/or/circuitpadding.h +++ b/src/core/or/circuitpadding.h @@ -173,11 +173,21 @@ typedef struct circpad_machine_conditions_t { /** Only apply the machine *if* the circuit's state matches any of * the bits set in this bitmask. */ - circpad_circuit_state_t state_mask; + circpad_circuit_state_t apply_state_mask; /** Only apply a machine *if* the circuit's purpose matches one * of the bits set in this bitmask */ - circpad_purpose_mask_t purpose_mask; + circpad_purpose_mask_t apply_purpose_mask; + + /** Keep a machine if any of the circuits's state machine's match + * the bits set in this bitmask, but don't apply new machines if + * they match this mask. */ + circpad_circuit_state_t keep_state_mask; + + /** Keep a machine if any of the circuits's state machine's match + * the bits set in this bitmask, but don't apply new machines if + * they match this mask. */ + circpad_purpose_mask_t keep_purpose_mask; } circpad_machine_conditions_t; |