aboutsummaryrefslogtreecommitdiff
path: root/src/or/channeltls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-16 11:20:59 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-16 11:20:59 -0500
commit2cee38f76a46860e2fb29fbd95ba36b332aa38c6 (patch)
tree3b2cbaeff1472c8d23c18f3e88bc4735bbb22bcc /src/or/channeltls.c
parentb310929ee36f0a88389dca53124506115c850c3b (diff)
parent20292ec4974b777d430e7962cc38349c5f82b220 (diff)
downloadtor-2cee38f76a46860e2fb29fbd95ba36b332aa38c6.tar.gz
tor-2cee38f76a46860e2fb29fbd95ba36b332aa38c6.zip
Merge branch 'prop271_030_v1_squashed'
Diffstat (limited to 'src/or/channeltls.c')
-rw-r--r--src/or/channeltls.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/channeltls.c b/src/or/channeltls.c
index aef0143c9d..dbed95fb43 100644
--- a/src/or/channeltls.c
+++ b/src/or/channeltls.c
@@ -49,6 +49,7 @@
#include "connection.h"
#include "connection_or.h"
#include "control.h"
+#include "entrynodes.h"
#include "link_handshake.h"
#include "relay.h"
#include "rephist.h"
@@ -1094,6 +1095,10 @@ channel_tls_handle_cell(cell_t *cell, or_connection_t *conn)
if (conn->base_.state == OR_CONN_STATE_OR_HANDSHAKING_V3)
or_handshake_state_record_cell(conn, conn->handshake_state, cell, 1);
+ /* We note that we're on the internet whenever we read a cell. This is
+ * a fast operation. */
+ entry_guards_note_internet_connectivity(get_guard_selection_info());
+
switch (cell->command) {
case CELL_PADDING:
++stats_n_padding_cells_processed;
@@ -1272,6 +1277,10 @@ channel_tls_handle_var_cell(var_cell_t *var_cell, or_connection_t *conn)
return;
}
+ /* We note that we're on the internet whenever we read a cell. This is
+ * a fast operation. */
+ entry_guards_note_internet_connectivity(get_guard_selection_info());
+
/* Now handle the cell */
switch (var_cell->command) {