summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_dos.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-10-31 13:57:14 -0400
committerDavid Goulet <dgoulet@torproject.org>2019-10-31 13:57:14 -0400
commite85f86bb7b676435b2eb11006f111f6e45b8d252 (patch)
tree9978af1c5da8eee404ad70e206c9bb908e8f6d5a /src/feature/hs/hs_dos.c
parentff8823d03cef50cb3a78f13a35558288e54c2173 (diff)
downloadtor-e85f86bb7b676435b2eb11006f111f6e45b8d252.tar.gz
tor-e85f86bb7b676435b2eb11006f111f6e45b8d252.zip
dos: Add HS DoS INTRO2 rejected stats in heartbeat
The DoS heartbeat now contains the number of rejected INTRODUCE2 cell that the relay has seen. Closes #31371 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_dos.c')
-rw-r--r--src/feature/hs/hs_dos.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/feature/hs/hs_dos.c b/src/feature/hs/hs_dos.c
index 81041475e8..d36ee97e6b 100644
--- a/src/feature/hs/hs_dos.c
+++ b/src/feature/hs/hs_dos.c
@@ -206,6 +206,13 @@ hs_dos_can_send_intro2(or_circuit_t *s_intro_circ)
return true;
}
+/* Return rolling count of rejected INTRO2. */
+uint64_t
+hs_dos_get_intro2_rejected_count(void)
+{
+ return intro2_rejected_count;
+}
+
/* Initialize the onion service Denial of Service subsystem. */
void
hs_dos_init(void)