diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/compress_zstd.c | 8 | ||||
-rw-r--r-- | src/or/channeltls.c | 11 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/common/compress_zstd.c b/src/common/compress_zstd.c index 58ec28d001..c1cdaf17ad 100644 --- a/src/common/compress_zstd.c +++ b/src/common/compress_zstd.c @@ -62,10 +62,10 @@ tor_zstd_get_version_str(void) version_number = ZSTD_versionNumber(); tor_snprintf(version_str, sizeof(version_str), - "%lu.%lu.%lu", - version_number / 10000 % 100, - version_number / 100 % 100, - version_number % 100); + "%d.%d.%d", + (int) version_number / 10000 % 100, + (int) version_number / 100 % 100, + (int) version_number % 100); return version_str; #else /* !(defined(HAVE_ZSTD)) */ diff --git a/src/or/channeltls.c b/src/or/channeltls.c index 7f68824482..8277813186 100644 --- a/src/or/channeltls.c +++ b/src/or/channeltls.c @@ -1793,12 +1793,11 @@ channel_tls_process_netinfo_cell(cell_t *cell, channel_tls_t *chan) return; } /* A relay can connect from anywhere and be canonical, so - * long as it tells you from where it came. This may be a bit - * concerning.. Luckily we have another check in - * channel_tls_matches_target_method() to ensure that extends - * only go to the IP they ask for. - * - * XXX: Bleh. That check is not used if the connection is canonical. + * long as it tells you from where it came. This may sound a bit + * concerning... but that's what "canonical" means: that the + * address is one that the relay itself has claimed. The relay + * might be doing something funny, but nobody else is doing a MITM + * on the relay's TCP. */ if (tor_addr_eq(&addr, &(chan->conn->real_addr))) { connection_or_set_canonical(chan->conn, 1); |