mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
8c83e8cec0
The control port was using set_max_file_descriptors() with a limit set to 0 to query the number of maximum socket Tor can use. With the recent changes to that function, a check was introduced to make sure a user can not set a value below the amount we reserved for non socket. This commit adds get_max_sockets() that returns the value of max_sockets so we can stop using that "setter" function to get the current value. Finally, the dead code is removed that is the code that checked for limit equal to 0. From now on, set_max_file_descriptors() should never be used with a limit set to 0 for a valid use case. Fixes #16697 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
11 lines
541 B
Plaintext
11 lines
541 B
Plaintext
o Minor bugfixes
|
|
- Control port was using set_max_file_descriptors() with a limit set to
|
|
0 to get the max value. A recent fix made this use case return an
|
|
error and introduced dead code in that function. This triggered a
|
|
warning that our limit (ConnLimit) was invalid but in reality it was
|
|
not.
|
|
|
|
Now, to the control port uses a specific getter function to query the
|
|
value and set_max_file_descriptors() should never be used again for
|
|
that purpose. Fixes #16697; bugfix on 0.2.7.2-alpha.
|