From 6249b0fd7757293876549c58c6cfe351d44a1d11 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 28 Jul 2009 18:34:35 -0400 Subject: [PATCH 1/5] Fix a signed/unsigned compile warning in 0.2.1.19 --- ChangeLog | 5 +++++ src/or/config.c | 8 ++++---- src/or/or.h | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed76e22f95..4fb38cf22f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Changes in version 0.2.1.20 - 2009-??-?? + o Minor bugfixes: + - Fix a signed/unsigned compile warning in 0.2.1.19. + + Changes in version 0.2.1.19 - 2009-07-28 o Major bugfixes: - Make accessing hidden services on 0.2.1.x work right diff --git a/src/or/config.c b/src/or/config.c index 3f45b1e5e2..fa986a6fc2 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1224,10 +1224,10 @@ options_need_geoip_info(or_options_t *options, const char **reason_out) /** Return the bandwidthrate that we are going to report to the authorities * based on the config options. */ -int +uint32_t get_effective_bwrate(or_options_t *options) { - int bw = (int)options->BandwidthRate; + uint32_t bw = (int)options->BandwidthRate; if (bw > options->MaxAdvertisedBandwidth) bw = (int)options->MaxAdvertisedBandwidth; if (options->RelayBandwidthRate > 0 && bw > options->RelayBandwidthRate) @@ -1237,10 +1237,10 @@ get_effective_bwrate(or_options_t *options) /** Return the bandwidthburst that we are going to report to the authorities * based on the config options. */ -int +uint32_t get_effective_bwburst(or_options_t *options) { - int bw = (int)options->BandwidthBurst; + uint32_t bw = (int)options->BandwidthBurst; if (options->RelayBandwidthBurst > 0 && bw > options->RelayBandwidthBurst) bw = (int)options->RelayBandwidthBurst; return bw; diff --git a/src/or/or.h b/src/or/or.h index 1dcff28d6d..319b3a9d10 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2926,8 +2926,8 @@ int options_need_geoip_info(or_options_t *options, const char **reason_out); int getinfo_helper_config(control_connection_t *conn, const char *question, char **answer); -int get_effective_bwrate(or_options_t *options); -int get_effective_bwburst(or_options_t *options); +uint32_t get_effective_bwrate(or_options_t *options); +uint32_t get_effective_bwburst(or_options_t *options); #ifdef CONFIG_PRIVATE /* Used only by config.c and test.c */ From 6a960d515f35433344fc65ffdf4d58334bb33c3f Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 28 Jul 2009 20:44:51 -0400 Subject: [PATCH 2/5] credit optimist for the bug 1038 diagnosis also bring the release notes up to date --- ChangeLog | 14 ++++++++++++-- ReleaseNotes | 31 +++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4fb38cf22f..132c81597f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,9 +4,13 @@ Changes in version 0.2.1.20 - 2009-??-?? Changes in version 0.2.1.19 - 2009-07-28 + Tor 0.2.1.19 fixes a major bug with accessing and providing hidden + services on Tor 0.2.1.3-alpha through 0.2.1.18. + o Major bugfixes: - - Make accessing hidden services on 0.2.1.x work right - again. Bugfix on 0.2.1.3-alpha; workaround for bug 1038. + - Make accessing hidden services on 0.2.1.x work right again. + Bugfix on 0.2.1.3-alpha; workaround for bug 1038. Diagnosis and + part of patch provided by "optimist". o Minor features: - When a relay/bridge is writing out its identity key fingerprint to @@ -25,6 +29,12 @@ Changes in version 0.2.1.19 - 2009-07-28 Changes in version 0.2.1.18 - 2009-07-24 + Tor 0.2.1.18 lays the foundations for performance improvements, + adds status events to help users diagnose bootstrap problems, adds + optional authentication/authorization for hidden services, fixes a + variety of potential anonymity problems, and includes a huge pile of + other features and bug fixes. + o Build fixes: - Add LIBS=-lrt to Makefile.am so the Tor RPMs use a static libevent. diff --git a/ReleaseNotes b/ReleaseNotes index f4e1a00cfb..bd2e3090a3 100644 --- a/ReleaseNotes +++ b/ReleaseNotes @@ -3,7 +3,38 @@ This document summarizes new features and bugfixes in each stable release of Tor. If you want to see more detailed descriptions of the changes in each development snapshot, see the ChangeLog file. +Changes in version 0.2.1.19 - 2009-07-28 + Tor 0.2.1.19 fixes a major bug with accessing and providing hidden + services. + + o Major bugfixes: + - Make accessing hidden services on 0.2.1.x work right again. + Bugfix on 0.2.1.3-alpha; workaround for bug 1038. Diagnosis and + part of patch provided by "optimist". + + o Minor features: + - When a relay/bridge is writing out its identity key fingerprint to + the "fingerprint" file and to its logs, write it without spaces. Now + it will look like the fingerprints in our bridges documentation, + and confuse fewer users. + + o Minor bugfixes: + - Relays no longer publish a new server descriptor if they change + their MaxAdvertisedBandwidth config option but it doesn't end up + changing their advertised bandwidth numbers. Bugfix on 0.2.0.28-rc; + fixes bug 1026. Patch from Sebastian. + - Avoid leaking memory every time we get a create cell but we have + so many already queued that we refuse it. Bugfix on 0.2.0.19-alpha; + fixes bug 1034. Reported by BarkerJr. + + Changes in version 0.2.1.18 - 2009-07-24 + Tor 0.2.1.18 lays the foundations for performance improvements, + adds status events to help users diagnose bootstrap problems, adds + optional authentication/authorization for hidden services, fixes a + variety of potential anonymity problems, and includes a huge pile of + other features and bug fixes. + o Major features (clients): - Start sending "bootstrap phase" status events to the controller, so it can keep the user informed of progress fetching directory From 3d99723411bd3a89b8910cdcced2e29218535d3e Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 29 Jul 2009 12:18:25 +0200 Subject: [PATCH 3/5] New upstream version --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6ca97ef3d0..262058fe52 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +tor (0.2.1.19-1) unstable; urgency=low + + * New upstream version. + + -- Peter Palfrader Wed, 29 Jul 2009 12:18:14 +0200 + tor (0.2.1.18-1) unstable; urgency=low * New upstream version. From 58ccdfccefb467fe453ec65e1cea90a6e7f729af Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Wed, 29 Jul 2009 12:49:52 +0200 Subject: [PATCH 4/5] Mention that this closes #538960 in the changelog --- debian/changelog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 262058fe52..00eae0f0ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ tor (0.2.1.19-1) unstable; urgency=low * New upstream version. + - Make accessing hidden services on 0.2.1.x work right (closes: #538960). + [More items are in the upstream changelog.] - -- Peter Palfrader Wed, 29 Jul 2009 12:18:14 +0200 + -- Peter Palfrader Wed, 29 Jul 2009 12:49:03 +0200 tor (0.2.1.18-1) unstable; urgency=low From 4577bda7669885c077624f99657520b7b0f6f96b Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 30 Jul 2009 10:14:12 -0400 Subject: [PATCH 5/5] Cleaner fix for get_effective_bw(rate|burst), with comment on why it is ok. --- src/or/config.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/or/config.c b/src/or/config.c index fa986a6fc2..603f1b606d 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1227,12 +1227,14 @@ options_need_geoip_info(or_options_t *options, const char **reason_out) uint32_t get_effective_bwrate(or_options_t *options) { - uint32_t bw = (int)options->BandwidthRate; + uint64_t bw = options->BandwidthRate; if (bw > options->MaxAdvertisedBandwidth) - bw = (int)options->MaxAdvertisedBandwidth; + bw = options->MaxAdvertisedBandwidth; if (options->RelayBandwidthRate > 0 && bw > options->RelayBandwidthRate) - bw = (int)options->RelayBandwidthRate; - return bw; + bw = options->RelayBandwidthRate; + + /* ensure_bandwidth_cap() makes sure that this cast can't overflow. */ + return (uint32_t)bw; } /** Return the bandwidthburst that we are going to report to the authorities @@ -1240,10 +1242,11 @@ get_effective_bwrate(or_options_t *options) uint32_t get_effective_bwburst(or_options_t *options) { - uint32_t bw = (int)options->BandwidthBurst; + uint64_t bw = options->BandwidthBurst; if (options->RelayBandwidthBurst > 0 && bw > options->RelayBandwidthBurst) - bw = (int)options->RelayBandwidthBurst; - return bw; + bw = options->RelayBandwidthBurst; + /* ensure_bandwidth_cap() makes sure that this cast can't overflow. */ + return (uint32_t)bw; } /** Fetch the active option list, and take actions based on it. All of the