mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
r13730@catbus: nickm | 2007-07-12 12:32:40 -0400
Patch from lodger: avoid roundoff-error-induced crash bugs when picking routers by bandwidth. Also, remove listed backports for 0.1.2.x; that list is now in TODO.012 svn:r10812
This commit is contained in:
parent
9ed261cd6a
commit
656b7761a8
10
ChangeLog
10
ChangeLog
@ -41,6 +41,11 @@ Changes in version 0.2.0.3-alpha - 2007-??-??
|
||||
- Fix a crash bug when router descriptors end at a 4096-byte boundary
|
||||
on disk. [Bugfix on 0.1.2.x]
|
||||
|
||||
o Minor bugfixes (core protocol):
|
||||
- When sending destroy cells from a circuit's origin, don't include
|
||||
the reason for tearing down the circuit. The spec says we didn't,
|
||||
and now we actually don't. Reported by lodger. [Bugfix on 0.1.2.x]
|
||||
|
||||
o Minor bugfixes (directory):
|
||||
- Fix another crash bug related to extra-info caching. (Bug found by
|
||||
Peter Palfrader.) [Bugfix on 0.2.0.2-alpha]
|
||||
@ -75,9 +80,6 @@ Changes in version 0.2.0.3-alpha - 2007-??-??
|
||||
o Security fixes (BSD natd support):
|
||||
- Fix a possible buffer overrun when using BSD natd support. Bug found
|
||||
by croup.
|
||||
- When sending destroy cells from a circuit's origin, don't include
|
||||
the reason for tearing down the circuit. The spec says we didn't,
|
||||
and now we actually don't. Reported by lodger. [Bugfix on 0.1.2.x]
|
||||
|
||||
|
||||
Changes in version 0.2.0.2-alpha - 2007-06-02
|
||||
@ -271,6 +273,8 @@ Changes in version 0.2.0.1-alpha - 2007-06-01
|
||||
we restart.
|
||||
- Add even more asserts to hunt down bug 417.
|
||||
- Build without verbose warnings even on (not-yet-released) gcc 4.2.
|
||||
- Fix a possible (but very unlikely) bug in picking routers by bandwidth.
|
||||
Add a log message to confirm that it is in fact unlikely.
|
||||
|
||||
o Minor bugfixes (controller):
|
||||
- Make 'getinfo fingerprint' return a 551 error if we're not a
|
||||
|
4
doc/TODO
4
doc/TODO
@ -15,10 +15,6 @@ P - phobos claims
|
||||
|
||||
Documentation and testing on 0.1.2.x-final series
|
||||
|
||||
- Pending backports for 0.1.2.x:
|
||||
- r10148: Open cached-routers with FILE_SHARE_READ on win32.
|
||||
- r10493: Weight guard selection by bandwidth.
|
||||
|
||||
N - Test guard unreachable logic; make sure that we actually attempt to
|
||||
connect to guards that we think are unreachable from time to time.
|
||||
Make sure that we don't freak out when the network is down.
|
||||
|
@ -1294,6 +1294,12 @@ smartlist_choose_by_bandwidth(smartlist_t *sl, int for_exit, int statuses)
|
||||
if (tmp >= rand_bw)
|
||||
break;
|
||||
}
|
||||
if (i == smartlist_len(sl)) {
|
||||
/* This is possible due to round-off error. */
|
||||
--i;
|
||||
log_warn(LD_BUG, "Round-off error in computing bandwidth had an effect on "
|
||||
" which router we chose. Please tell the developers.");
|
||||
}
|
||||
tor_free(bandwidths);
|
||||
return smartlist_get(sl, i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user