diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2011-10-30 02:13:46 -0700 |
---|---|---|
committer | Robert Ransom <rransom.8774@gmail.com> | 2011-10-31 05:05:45 -0700 |
commit | 272dd90b5c9998130f65edd65df1c066dc4599aa (patch) | |
tree | cb90794fba12cd5085d3fb8784a41bcd1033e093 /src/or/rendservice.c | |
parent | 1a52a947c557ac04ee96addff404dc50cf5c26eb (diff) | |
download | tor-272dd90b5c9998130f65edd65df1c066dc4599aa.tar.gz tor-272dd90b5c9998130f65edd65df1c066dc4599aa.zip |
Ignore timestamps of INTRODUCE2 cells
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 413d4f670a..46806171e9 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -1037,7 +1037,6 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request, len = r; if (*buf == 3) { /* Version 3 INTRODUCE2 cell. */ - time_t ts = 0; v3_shift = 1; auth_type = buf[1]; switch (auth_type) { @@ -1059,17 +1058,8 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request, log_info(LD_REND, "Unknown authorization type '%d'", auth_type); } - /* Check timestamp. */ - ts = ntohl(get_uint32(buf+1+v3_shift)); + /* Skip the timestamp field. We no longer use it. */ v3_shift += 4; - if ((now - ts) < -1 * REND_REPLAY_TIME_INTERVAL / 2 || - (now - ts) > REND_REPLAY_TIME_INTERVAL / 2) { - /* This is far more likely to mean that a client's clock is - * skewed than that a replay attack is in progress. */ - log_info(LD_REND, "INTRODUCE2 cell is too %s. Discarding.", - (now - ts) < 0 ? "old" : "new"); - return -1; - } } if (*buf == 2 || *buf == 3) { /* Version 2 INTRODUCE2 cell. */ |