tor/src/or
David Goulet 8c83e8cec0 Add get_max_sockets() and remove dead code
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>
2015-07-30 15:21:12 -04:00
..
addressmap.c Merge branch 'bug7555_v2_squashed' 2015-01-19 11:43:41 -05:00
addressmap.h Allow MapAddress and Automap to work together 2015-01-13 12:41:15 -05:00
buffers.c Merge branch 'writing_tests' 2015-05-07 15:29:56 -04:00
buffers.h Remove mempools and buf freelists 2015-02-11 09:03:50 -05:00
channel.c Tests for AUTHENTICATE cell functionality. 2015-05-28 10:41:50 -04:00
channel.h Tests for AUTHENTICATE cell functionality. 2015-05-28 10:41:50 -04:00
channeltls.c Appease make check-spaces 2015-06-01 12:59:14 +00:00
channeltls.h Tests for AUTHENTICATE cell functionality. 2015-05-28 10:41:50 -04:00
circpathbias.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
circpathbias.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
circuitbuild.c Reachability should check ExtendAllowPrivateAddresses not TestingTorNetwork 2015-04-22 23:54:21 +10:00
circuitbuild.h fix a compilation warning 2015-02-11 15:10:35 -05:00
circuitlist.c trivial whitespace fix 2015-02-17 06:01:33 -05:00
circuitlist.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
circuitmux_ewma.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
circuitmux_ewma.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
circuitmux.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
circuitmux.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
circuitstats.c Implement EVENT_NETWORK_LIVENESS 2015-05-17 13:42:57 +00:00
circuitstats.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
circuituse.c Rename ambiguous introduction point functions 2015-07-14 02:29:17 -04:00
circuituse.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
command.c Merge remote-tracking branch 'public/bug9635_warnings_025' 2015-02-02 16:31:32 -05:00
command.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
config.c whitespace fix 2015-07-30 13:17:08 -04:00
config.h Merge branch '12498_ed25519_keys_v6' 2015-05-28 11:04:33 -04:00
confparse.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
confparse.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
connection_edge.c Add "HiddenServiceMaxStreams" as a per-HS tunable. 2015-05-20 17:33:59 +00:00
connection_edge.h Make check-spaces happier. 2015-01-19 11:56:03 -05:00
connection_or.c Memory leak on error in connection_or_compute_auth_cell_body. CID 1301372 2015-05-28 12:51:20 -04:00
connection_or.h Start testing cell encoders/processers for the v3 handshake. 2015-05-28 10:41:50 -04:00
connection.c Merge remote-tracking branch 'sysrqb/bug15220_026_sysrqb' 2015-07-16 15:38:08 -04:00
connection.h Restrict unix: addresses to control and socks for now 2015-01-29 14:51:59 -05:00
control.c Add get_max_sockets() and remove dead code 2015-07-30 15:21:12 -04:00
control.h Merge remote-tracking branch 'andrea/ticket15358_squashed_2' 2015-05-18 14:44:28 -04:00
cpuworker.c add an explanatory comment 2015-03-12 11:28:18 -04:00
cpuworker.h Refactor cpuworker to use workqueue/threadpool code. 2015-01-14 11:23:34 -05:00
dircollate.c Fix some memory leaks in ed25519 code and tests 2015-06-01 10:26:11 -04:00
dircollate.h Appease make check-spaces 2015-06-01 12:59:14 +00:00
directory.c Remove the HidServDirV2 and VoteOnHidServDirectoriesV2 options 2015-07-10 09:05:26 -04:00
directory.h whitespace fixes 2015-01-23 11:18:28 -05:00
dirserv.c Merge remote-tracking branch 'public/ticket16543' 2015-07-16 15:47:00 -04:00
dirserv.h Merge branch 'bug9321_rerebase' 2015-02-18 09:17:02 -05:00
dirvote.c Fix a warning from the clangalyzer. 2015-05-29 14:08:51 -04:00
dirvote.h Remove the HidServDirV2 and VoteOnHidServDirectoriesV2 options 2015-07-10 09:05:26 -04:00
dns.c Remove relative paths to header files. 2015-03-14 13:00:05 -04:00
dns.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
dnsserv.c Move entry_port_cfg_t fields in entry_connection_t 2015-01-16 09:22:58 -05:00
dnsserv.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
entrynodes.c Fix some conversion problems 2015-04-23 09:16:42 -04:00
entrynodes.h clean up comments and whitespace a bit 2015-02-18 19:27:02 -05:00
eventdns_tor.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
ext_orport.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
ext_orport.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
fp_pair.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
fp_pair.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
geoip.c Merge branch 'bug6852' 2015-02-03 13:06:58 -05:00
geoip.h Merge branch 'bug6852' 2015-02-03 13:06:58 -05:00
hibernate.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
hibernate.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
include.am Add rendcache.{c|h} 2015-06-18 12:56:24 -04:00
keypin.c Attempt to fix keypinning on Windows 2015-05-29 14:38:59 -04:00
keypin.h Tie key-pinning logic into directory authority operation 2015-05-28 10:41:49 -04:00
main.c Remove casting of void pointers when handling signals. 2015-07-21 14:06:15 -04:00
main.h Remove casting of void pointers when handling signals. 2015-07-21 14:06:15 -04:00
Makefile.nmake Implement scheduler mechanism to track lists of channels wanting cells or writes; doesn't actually drive the cell flow from it yet 2014-09-30 22:48:24 -07:00
microdesc.c Include ed25519 keys in microdescriptors. 2015-05-28 10:41:49 -04:00
microdesc.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
networkstatus.c Remove the HidServDirV2 and VoteOnHidServDirectoriesV2 options 2015-07-10 09:05:26 -04:00
networkstatus.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
nodelist.c Avoid logging natural-language reports that are redundant with bootstrapping 2015-02-23 13:03:56 -05:00
nodelist.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
ntmain.c Wrap windows-only C files in #ifdef _WIN32 2015-07-30 11:14:15 -04:00
ntmain.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
onion_fast.c Merge remote-tracking branch 'public/bug9635_warnings_025' 2015-02-02 16:31:32 -05:00
onion_fast.h Merge remote-tracking branch 'public/bug9635_warnings_025' 2015-02-02 16:31:32 -05:00
onion_ntor.c Merge remote-tracking branch 'public/bug9635_warnings_025' 2015-02-02 16:31:32 -05:00
onion_ntor.h Merge remote-tracking branch 'public/bug9635_warnings_025' 2015-02-02 16:31:32 -05:00
onion_tap.c Merge remote-tracking branch 'public/bug9635_warnings_025' 2015-02-02 16:31:32 -05:00
onion_tap.h Merge remote-tracking branch 'public/bug9635_warnings_025' 2015-02-02 16:31:32 -05:00
onion.c Merge remote-tracking branch 'public/bug9635_warnings_025' 2015-02-02 16:31:32 -05:00
onion.h Merge remote-tracking branch 'public/bug9635_warnings_025' 2015-02-02 16:31:32 -05:00
or.h Merge remote-tracking branch 'public/ticket16543' 2015-07-16 15:47:00 -04:00
policies.c Merge branch 'exitnode_10067_squashed' 2015-01-06 15:15:18 -05:00
policies.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
reasons.c Add string for IP_NOW_REDUNDANT in circuit_end_reason_to_control_string 2015-01-15 11:53:20 -05:00
reasons.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
relay.c Move cache objects and functions to rendcache.{c|h} 2015-06-18 12:56:46 -04:00
relay.h Remove lingering mempool code 2015-02-23 11:19:31 -05:00
rendcache.c Fix most check-spaces issues 2015-07-16 11:10:14 -04:00
rendcache.h Break some wide lines 2015-07-16 11:11:21 -04:00
rendclient.c Add missing descriptor ID to HS_DESC control event 2015-05-14 10:46:38 -04:00
rendclient.h Add rendcache.{c|h} 2015-06-18 12:56:24 -04:00
rendcommon.c Rename ambiguous introduction point functions 2015-07-14 02:29:17 -04:00
rendcommon.h Move cache objects and functions to rendcache.{c|h} 2015-06-18 12:56:46 -04:00
rendmid.c ... and if we do get multiple INTRODUCE1s on a circuit, kill the circuit 2015-04-03 09:40:47 -04:00
rendmid.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
rendservice.c Break some wide lines 2015-07-16 11:11:21 -04:00
rendservice.h Remove empty rend_service_validate_intro_early function 2015-07-14 02:30:04 -04:00
rephist.c Add link protocol version counts to the heartbeat message 2015-03-10 10:07:41 -04:00
rephist.h Add link protocol version counts to the heartbeat message 2015-03-10 10:07:41 -04:00
replaycache.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
replaycache.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
router.c Remove the HidServDirV2 and VoteOnHidServDirectoriesV2 options 2015-07-10 09:05:26 -04:00
router.h Merge branch '12498_ed25519_keys_v6' 2015-05-28 11:04:33 -04:00
routerkeys.c Fix most check-spaces issues 2015-07-16 11:10:14 -04:00
routerkeys.h If loading an ed25519 master key fails with errno != ENOENT, give up. 2015-07-14 10:36:39 -04:00
routerlist.c Remove the HidServDirV2 and VoteOnHidServDirectoriesV2 options 2015-07-10 09:05:26 -04:00
routerlist.h Implement proposal 228: cross-certification with onion keys 2015-05-28 10:40:57 -04:00
routerparse.c Fix most check-spaces issues 2015-07-16 11:10:14 -04:00
routerparse.h Merge branch '12498_ed25519_keys_v6' 2015-05-28 11:04:33 -04:00
routerset.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
routerset.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
scheduler.c Fix scheduler compilation on targets where char is unsigned. 2015-02-06 16:26:28 +00:00
scheduler.h Fix scheduler compilation on targets where char is unsigned. 2015-02-06 16:26:28 +00:00
statefile.c Merge branch 'master' of https://git.torproject.org/tor into bug13111-empty-key-files-fn-empty 2015-01-10 17:20:06 +11:00
statefile.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
status.c Add link protocol version counts to the heartbeat message 2015-03-10 10:07:41 -04:00
status.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
tor_main.c Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00
torcert.c Add more consistency checks in load_ed_keys 2015-07-14 11:27:49 -04:00
torcert.h Generate weird certificates correctly 2015-05-28 10:47:47 -04:00
transports.c Implement "TOR_PT_EXIT_ON_STDIN_CLOSE". 2015-03-26 12:55:12 +00:00
transports.h Bump copyright dates to 2015, in case someday this matters. 2015-01-02 14:27:39 -05:00