tor/src/or
David Goulet 93ff1870ba heartbeat: Log the number of circuits killed because too many cells
We recently merged a circuit cell queue size safeguard. This commit adds the
number of killed circuits that have reached the limit to the DoS heartbeat. It
now looks like this:

  [notice] DoS mitigation since startup: 0 circuits killed with too many
  cells. 0 circuits rejected, 0 marked addresses. 0 connections closed. 0
  single hop clients refused.

Second thing that this patch does. It makes tor always print the DoS
mitigation heartbeat line (for a relay) even though no DoS mitigation have
been enabled. The reason is because we now kill circuits that have too many
cells regardless on if it is enabled or not but also it will give the operator
a chance to learn what is enabled with the heartbeat instead of suddenly
appearing when it is enabled by let say the consensus.

Fixes #25824

Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-17 10:44:43 -04:00
..
addressmap.c Convert remaining function (mostly static) to new free style 2017-12-08 14:47:19 -05:00
addressmap.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
auth_dirs.inc Lift the list of default directory servers into their own file. 2018-04-09 16:00:26 +02:00
bridges.c Merge branch 'ticket23814' into maint-0.3.3 2018-03-03 11:53:01 -05:00
bridges.h Stop checking cached bridge descriptors for usable bridges 2017-11-22 02:00:34 +11:00
channel.c chan: Use channel_is_client() in channel_do_open_actions() 2018-03-23 10:11:37 -04:00
channel.h Merge branch 'maint-0.3.1' into maint-0.3.2 2018-02-16 09:54:13 -05:00
channelpadding.c more fixes for typos, grammar, whitespace, etc 2018-02-07 12:22:29 -05:00
channelpadding.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
channeltls.c Merge branch 'maint-0.3.1' into maint-0.3.2 2018-02-16 09:54:13 -05:00
channeltls.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
circpathbias.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
circpathbias.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
circuitbuild.c Refine extend_info_for_node's "enough info" check once again. 2018-04-12 16:56:29 -04:00
circuitbuild.h rephist: Stop tracking EXTEND attempts 2018-02-06 12:43:55 -05:00
circuitlist.c Log information on specific compression backends in the OOM handler. 2018-03-20 07:47:19 -04:00
circuitlist.h Merge branch 'maint-0.3.2' 2017-12-11 09:45:17 -05:00
circuitmux_ewma.c Switch to offsetof() 2017-08-03 08:56:35 -04:00
circuitmux_ewma.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
circuitmux.c Merge branch 'maint-0.3.2' 2017-12-21 10:54:05 -05:00
circuitmux.h Merge branch 'maint-0.3.2' 2017-12-21 10:54:05 -05:00
circuitstats.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
circuitstats.h Report close and timeout rates since uptime, not based on data. 2017-12-07 00:04:39 +00:00
circuituse.c Bug 24989: Count client hsdir gets towards MaxClientCircuitsPending. 2018-04-11 10:47:06 -04:00
circuituse.h Implement layer 2 and layer 3 guard pinning via torrc. 2018-01-19 22:21:48 +00:00
command.c Merge branch 'maint-0.3.1' into maint-0.3.2 2018-02-16 09:54:13 -05:00
command.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
config.c Attempt to fix 32-bit builds, which broke with 31508a0abc 2018-04-12 12:25:09 -04:00
config.h Use less memory for MaxMemInQueues for machines with more than 8 GB of RAM. 2018-04-12 11:14:16 -04:00
confparse.c Update free functions into macros: src/or/ part 1 2017-12-08 14:47:19 -05:00
confparse.h Simplify the very repetitious options_transition_allowed() 2017-12-15 15:32:46 -05:00
connection_edge.c Bug 24946: Fix a warning message caused by a missed purpose check. 2018-01-20 03:18:31 +00:00
connection_edge.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
connection_or.c test: Add unittest for the OR connection failure cache 2018-03-27 12:43:39 -04:00
connection_or.h test: Add unittest for the OR connection failure cache 2018-03-27 12:43:39 -04:00
connection.c Merge branch 'maint-0.3.1' into maint-0.3.2 2018-02-16 09:54:13 -05:00
connection.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
conscache.c Merge branch 'macro_free_v2_squashed' 2017-12-08 14:58:43 -05:00
conscache.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
consdiff.c Improve fragile-hardening performance of consensus_split_lines. 2018-01-16 12:42:40 -05:00
consdiff.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
consdiffmgr.c Merge branch 'maint-0.3.1' into maint-0.3.2 2018-01-31 10:06:49 -05:00
consdiffmgr.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
control.c Merge branch 'bug24903_029' into maint-0.3.3 2018-03-26 10:32:49 -04:00
control.h control: Don't use void pointer for ADD_ONION secret key 2017-12-05 19:39:46 -05:00
cpuworker.c more fixes for typos, grammar, whitespace, etc 2018-02-07 12:22:29 -05:00
cpuworker.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
dircollate.c Convert remaining function (mostly static) to new free style 2017-12-08 14:47:19 -05:00
dircollate.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
directory.c Merge branch 'ticket23814' into maint-0.3.3 2018-03-03 11:53:01 -05:00
directory.h remove the max_failures argument from download_status_is_ready. 2018-01-31 15:03:47 -05:00
dirserv.c dir auths no longer vote Guard if they're not voting V2Dir 2018-04-02 00:20:01 -04:00
dirserv.h Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
dirvote.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
dirvote.h Merge branch 'macro_free_v2_squashed' 2017-12-08 14:58:43 -05:00
dns_structs.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
dns.c Merge branch 'bug21394_029_redux' into maint-0.3.3 2018-04-04 08:55:37 -04:00
dns.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
dnsserv.c Merge branch 'bug25617_029' into maint-0.3.3 2018-03-29 14:58:58 -04:00
dnsserv.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
dos.c heartbeat: Log the number of circuits killed because too many cells 2018-04-17 10:44:43 -04:00
dos.h dos: Make sure cc_stats_refill_bucket can't overflow while calculating 2018-01-31 09:27:59 -05:00
entrynodes.c circ: Don't cannibalize a circuit if the guard state is unusable 2018-01-31 16:10:48 -05:00
entrynodes.h Improve doc of primary_guards_up_to_date. 2018-02-07 11:46:30 +02:00
ext_orport.c Convert remaining function (mostly static) to new free style 2017-12-08 14:47:19 -05:00
ext_orport.h Convert remaining function (mostly static) to new free style 2017-12-08 14:47:19 -05:00
fallback_dirs.inc Add 7 other fallback dirs from teor's tests 2018-01-08 11:03:44 -05:00
fp_pair.c Change the free macro convention in the rest of src/or/*.h 2017-12-08 14:47:19 -05:00
fp_pair.h Change the free macro convention in the rest of src/or/*.h 2017-12-08 14:47:19 -05:00
geoip.c Merge branch 'maint-0.3.1' into maint-0.3.2 2018-02-16 09:54:13 -05:00
geoip.h Merge branch 'maint-0.3.1' into maint-0.3.2 2018-02-16 09:54:13 -05:00
git_revision.c Move tor_git_revision into a new module. 2017-10-18 13:49:35 -04:00
git_revision.h re-run ./scripts/maint/annotate_ifdef_directives 2017-11-21 14:07:43 -05:00
hibernate.c Merge branch 'bug23571_033_squashed' 2017-10-31 11:59:18 -04:00
hibernate.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
hs_cache.c more fixes for typos, grammar, whitespace, etc 2018-02-07 12:22:29 -05:00
hs_cache.h hs-v3: Add an encoded descriptor client cache lookup function 2017-11-20 11:02:30 -05:00
hs_cell.c prop224: Add a function to clear INTRO data 2017-08-24 13:03:28 -04:00
hs_cell.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
hs_circuit.c whitespace and typo cleanups 2018-02-09 17:05:20 -05:00
hs_circuit.h Merge branch 'maint-0.3.2' 2017-12-11 09:45:17 -05:00
hs_circuitmap.c Merge remote-tracking branch 'ffmancera/github/bug23459' 2017-12-11 09:53:39 -05:00
hs_circuitmap.h Split client-side get_rend_circ into two functions. 2017-12-08 18:14:08 +01:00
hs_client.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
hs_client.h hs-v3: Attempt descriptor refetch when dirinfo changes 2017-10-31 12:14:11 -04:00
hs_common.c oxford comma for-the-win 2018-01-19 18:42:53 -05:00
hs_common.h Merge branch 'maint-0.3.2' 2018-01-19 16:30:53 -05:00
hs_config.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
hs_config.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
hs_control.c Check the return value of hs_parse_address(). 2017-12-06 14:56:52 +01:00
hs_control.h hs-v3: Add an handler for the HSPOST command 2017-12-05 19:39:46 -05:00
hs_descriptor.c Fix wide lines from typo-fix patch. 2018-02-07 10:46:05 -05:00
hs_descriptor.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
hs_ident.c Change the free macro convention in the rest of src/or/*.h 2017-12-08 14:47:19 -05:00
hs_ident.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
hs_intropoint.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
hs_intropoint.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
hs_ntor.c Explicit length checks in create_rend_cpath(). 2017-07-07 11:12:27 -04:00
hs_ntor.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
hs_service.c Fix windows compilation warnings in hs_service.c 2018-03-23 17:47:56 -04:00
hs_service.h Merge branch 'macro_free_v2_squashed' 2017-12-08 14:58:43 -05:00
hs_stats.c Add onion service activity information to our heartbeat logs. 2018-01-23 12:31:06 +02:00
hs_stats.h Add onion service activity information to our heartbeat logs. 2018-01-23 12:31:06 +02:00
include.am Merge branch 'maint-0.3.2' into maint-0.3.3 2018-04-10 14:26:32 -04:00
keypin.c Run the copyright update script. 2017-03-15 16:13:17 -04:00
keypin.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
main.c Merge branch 'maint-0.3.1' into maint-0.3.2 2018-02-16 09:54:13 -05:00
main.h Merge branch 'disable_signal_handlers' 2018-01-19 16:35:24 -05:00
Makefile.nmake Netflow record collapsing defense. 2017-05-08 13:49:21 -04:00
microdesc.c remove the max_failures argument from download_status_is_ready. 2018-01-31 15:03:47 -05:00
microdesc.h Change the free macro convention in the rest of src/or/*.h 2017-12-08 14:47:19 -05:00
networkstatus.c relay: Implement a circuit cell queue maximum size 2018-04-16 09:59:12 -04:00
networkstatus.h Add networkstatus_consensus_has_ipv6() and unit tests 2017-12-11 00:34:19 +11:00
nodelist.c Merge remote-tracking branch 'dgoulet/bug24767_033_03' into maint-0.3.3 2018-03-28 14:21:04 -04:00
nodelist.h test: Add unittest for the OR connection failure cache 2018-03-27 12:43:39 -04:00
ntmain.c Merge remote-tracking branch 'public/bug23081_025' into maint-0.2.9 2017-10-23 08:47:52 -04:00
ntmain.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
onion_fast.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
onion_fast.h Replace all FREE_AND_NULL* uses to take a type and a free function. 2017-12-08 14:47:19 -05:00
onion_ntor.c Change the free macro convention in the rest of src/or/*.h 2017-12-08 14:47:19 -05:00
onion_ntor.h Replace all FREE_AND_NULL* uses to take a type and a free function. 2017-12-08 14:47:19 -05:00
onion_tap.c Rename the hybrid_encrypt/decrypt functions; label them as dangerous 2017-07-24 14:34:53 -04:00
onion_tap.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
onion.c Change the free macro convention in the rest of src/or/*.h 2017-12-08 14:47:19 -05:00
onion.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
or.h Merge remote-tracking branch 'dgoulet/bug25226_033_02' into maint-0.3.3 2018-04-16 10:04:36 -04:00
parsecommon.c Fix warnings about passing uninitialized buffers into functions 2017-09-12 21:32:42 -04:00
parsecommon.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
periodic.c Run the copyright update script. 2017-03-15 16:13:17 -04:00
periodic.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
policies.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
policies.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
proto_cell.c Add unit tests for var_cell and control0 proto functions. 2017-09-27 09:09:00 -04:00
proto_cell.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
proto_control0.c Refactor buffer APIs to put a buf_t first. 2017-09-05 13:57:51 -04:00
proto_control0.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
proto_ext_or.c Refactor buffer APIs to put a buf_t first. 2017-09-05 13:57:51 -04:00
proto_ext_or.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
proto_http.c Refactor buffer APIs to put a buf_t first. 2017-09-05 13:57:51 -04:00
proto_http.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
proto_socks.c Allow IPv6 address strings to be used as hostnames in SOCKS5 requests 2018-03-28 07:39:03 -04:00
proto_socks.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
protover_rust.c re-run ./scripts/maint/annotate_ifdef_directives 2017-11-21 14:07:43 -05:00
protover.c protover: Change protover_all_supported() to return only unsupported. 2018-04-02 19:59:12 +00:00
protover.h move a macro; fix a build? 2017-12-08 15:11:18 -05:00
reasons.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
reasons.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
relay.c heartbeat: Log the number of circuits killed because too many cells 2018-04-17 10:44:43 -04:00
relay.h heartbeat: Log the number of circuits killed because too many cells 2018-04-17 10:44:43 -04:00
rendcache.c more fixes for typos, grammar, whitespace, etc 2018-02-07 12:22:29 -05:00
rendcache.h Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
rendclient.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
rendclient.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
rendcommon.c Change the free macro convention in the rest of src/or/*.h 2017-12-08 14:47:19 -05:00
rendcommon.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
rendmid.c Merge branch 'maint-0.3.1' into maint-0.3.2 2018-02-16 09:54:13 -05:00
rendmid.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
rendservice.c more fixes for typos, grammar, whitespace, etc 2018-02-07 12:22:29 -05:00
rendservice.h Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
rephist.c Merge remote-tracking branch 'dgoulet/ticket25163_033_01' 2018-02-07 12:46:27 -05:00
rephist.h rephist: Stop tracking relay connection status 2018-02-06 12:56:36 -05:00
replaycache.c whitespace and typo cleanups 2018-02-09 17:05:20 -05:00
replaycache.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
router.c Merge branch 'maint-0.3.0' into maint-0.3.1 2017-12-11 16:54:14 -05:00
router.h Replace all FREE_AND_NULL* uses to take a type and a free function. 2017-12-08 14:47:19 -05:00
routerkeys.c Merge branch 'maint-0.3.2' 2018-01-31 09:19:55 -05:00
routerkeys.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
routerlist.c Merge branch 'ticket23814' into maint-0.3.3 2018-03-03 11:53:01 -05:00
routerlist.h Fix wide lines introduced by previous patch. 2017-12-08 14:47:19 -05:00
routerparse.c Merge branch 'ticket23814' into maint-0.3.3 2018-03-03 11:53:01 -05:00
routerparse.h Fix a failing unit test. 2018-01-31 14:06:37 -05:00
routerset.c Change the free macro convention in the rest of src/or/*.h 2017-12-08 14:47:19 -05:00
routerset.h Replace all FREE_AND_NULL* uses to take a type and a free function. 2017-12-08 14:47:19 -05:00
scheduler_kist.c more fixes for typos, grammar, whitespace, etc 2018-02-07 12:22:29 -05:00
scheduler_vanilla.c Remove now-duplicate log_debug lines 2017-12-11 09:43:09 -05:00
scheduler.c Merge branch 'maint-0.3.2' 2018-02-02 12:03:54 -05:00
scheduler.h Merge branch 'maint-0.3.2' 2018-02-01 08:15:09 -05:00
shared_random_state.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
shared_random_state.h Convert remaining function (mostly static) to new free style 2017-12-08 14:47:19 -05:00
shared_random.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
shared_random.h Replace all FREE_AND_NULL* uses to take a type and a free function. 2017-12-08 14:47:19 -05:00
statefile.c Change the free macro convention in the rest of src/or/*.h 2017-12-08 14:47:19 -05:00
statefile.h Replace all FREE_AND_NULL* uses to take a type and a free function. 2017-12-08 14:47:19 -05:00
status.c Merge branch 'maint-0.2.9' into maint-0.3.1 2018-02-16 09:48:11 -05:00
status.h Run our #else/#endif annotator on our source code. 2017-09-15 16:24:44 -04:00
tor_api_internal.h re-run ./scripts/maint/annotate_ifdef_directives 2017-11-21 14:07:43 -05:00
tor_api.c Add a public tor_api.h with an implementation in tor_api.c 2017-11-01 13:22:09 -04:00
tor_api.h Update the documentation in tor_api.h 2018-03-13 10:00:41 +01:00
tor_main.c Add a mostly disabled feature to debug restarting in-process 2018-01-19 09:52:05 -05:00
torcert.c Merge branch 'maint-0.3.2' 2018-01-31 09:19:55 -05:00
torcert.h Merge branch 'maint-0.3.2' 2018-01-31 09:19:55 -05:00
transports.c Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
transports.h Replace all FREE_AND_NULL* uses to take a type and a free function. 2017-12-08 14:47:19 -05:00