We have two similar options, ConnectionPadding and CircuitPaddingDisabled.
In the current branch, 0 means "connection padding off" but "circuit padding on". Which makes it easier for a developer or user to make a mistake.
But it's hard to make the options entirely consistent, because ConnectionPadding has 3 options (force on, negotiate, force off), but CircuitPadding has 2 (negotiate, force off).
Here's one possible design (let's call it A):
0
auto
1
ConnectionPadding
off
negotiate
on
CircuitPadding
off
negotiate
can't force on: reject config as invalid
Here is another (let's call it B):
0
auto
1
ConnectionPadding
off
negotiate
on
CircuitPadding
off
no third state: reject config as invalid
negotiate
In A, ConnectionPadding and CircuitPadding are consistent with each other: 0 means off and auto means negotiate.
In B, CircuitPadding is consistent with other 2-state torrc options, because it uses 0 and 1. But negotiate is auto in ConnectionPadding and 1 in CircuitPadding.
Do we have any existing options that are (0, auto) or (1, auto)?
If we don't, we shouldn't add one.
If we do, I guess it's ok, as long as we document it.
That PR contains fixes for #28693 (moved), #30173 (moved), and #29203 (moved). I recommend that the same reviewer review all three tickets -- they are extremely similar and related code (hence all in the same branch with the same test; doing these separetely would involve needless extra mental context switching and extra communication).
Trac: Actualpoints: N/Ato 0.33 Status: needs_revision to needs_review