summaryrefslogtreecommitdiff
path: root/src/or/rephist.c
AgeCommit message (Collapse)Author
2016-07-28Three more -Wshadow fixes.Nick Mathewson
2016-07-28Fix a huge pile of -Wshadow warnings.Nick Mathewson
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.
2016-06-20Make base16_decodes return number of decoded bytesnikkolasg
base16_decodes() now returns the number of decoded bytes. It's interface changes from returning a "int" to a "ssize_t". Every callsite now checks the returned value. Fixes #14013 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-06-11Merge branch 'bug19180_easy_squashed'Nick Mathewson
2016-06-11Add the -Wextra-semi warning from clang, and fix the cases where it triggersNick Mathewson
2016-05-30Replace nearly all XXX0vv comments with smarter onesNick Mathewson
So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we had better revisit this comment and fix it!" But we have a huge pile of such comments accumulated for a large number of released versions! Not cool. So, here's what I tried to do: * 0.2.9 and 0.2.8 are retained, since those are not yet released. * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks quite important!" * The others, after one-by-one examination, are downgraded to plain old XXX. Which doesn't mean they aren't a problem -- just that they cannot possibly be a release-blocking problem.
2016-05-20Make another variable unsigned.Nick Mathewson
2016-05-19Compute HS stats outputs without round_int64_...Nick Mathewson
Fix for bug 19130.
2016-05-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-16touchups and refactorings on bug 18616 branchRoger Dingledine
no behavior changes
2016-04-14Add new tor_assert_nonfatal*() macros.Nick Mathewson
Unlike tor_assert(), these macros don't abort the process. They're good for checking conditions we want to warn about, but which don't warrant a full crash. This commit also changes the default implementation for tor_fragile_assert() to tor_assert_nonfatal_unreached_once(). Closes ticket 18613.
2016-03-28Fix memory-counting error in rephist.c. Bug 18651. (Now with actual patch)Nick Mathewson
2016-02-27Update the copyright year.Nick Mathewson
2015-12-15Replace usage of INLINE with inlinecypherpunks
This patch was generated using; sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-12-09Assert that memory held by rephist is freedcypherpunks
The internal memory allocation and history object counters of the reputation code can be used to verify the correctness of (part of) the code. Using these counters revealed an issue where the memory allocation counter is not decreased when the bandwidth arrays are freed. A new function ensures the memory allocation counter is decreased when a bandwidth array is freed. This commit also removes an unnecessary cast which was found while working on the code.
2015-05-06Fix hs stats comments to be more accurateDavid Goulet
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-03-10Add link protocol version counts to the heartbeat messageNick Mathewson
Closes ticket 15212
2015-01-07Merge remote-tracking branch 'public/bug13988_025'Nick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-22Increase bandwidth usage report interval to 4 hours.Nick Mathewson
2014-12-19Add two hidden-service related statistics.George Kadianakis
The two statistics are: 1. number of RELAY cells observed on successfully established rendezvous circuits; and 2. number of .onion addresses observed as hidden-service directory. Both statistics are accumulated over 24 hours, obfuscated by rounding up to the next multiple of a given number and adding random noise, and written to local file stats/hidserv-stats. Notably, no statistics will be gathered on clients or services, but only on relays.
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-09-02Another clang analyzer complaint wrt HT_GENERATENick Mathewson
We're calling mallocfn() and reallocfn() in the HT_GENERATE macro with the result of a product. But that makes any sane analyzer worry about overflow. This patch keeps HT_GENERATE having its old semantics, since we aren't the only project using ht.h. Instead, define a HT_GENERATE2 that takes a reallocarrayfn.
2014-09-02Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-09-02Fix a number of clang analyzer false-positivesNick Mathewson
Most of these are in somewhat non-obvious code where it is probably a good idea to initialize variables and add extra assertions anyway. Closes 13036. Patches from "teor".
2014-08-15Autoconvert most circuit-list iterations to smartlist iterationsNick Mathewson
Breaks compilation. Used this coccinelle script: @@ identifier c; typedef circuit_t; iterator name TOR_LIST_FOREACH; iterator name SMARTLIST_FOREACH_BEGIN; statement S; @@ - circuit_t *c; ... - TOR_LIST_FOREACH(c, \(&global_circuitlist\|circuit_get_global_list()\), head) + SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, c) S + SMARTLIST_FOREACH_END(c);
2014-08-13Apply coccinelle script to replace malloc(a*b)->calloc(a,b)Nick Mathewson
2014-05-11Quench clang's complaints with -Wshorten-64-to-32 when time_t is not long.dana koch
On OpenBSD 5.4, time_t is a 32-bit integer. These instances contain implicit treatment of long and time_t as comparable types, so explicitly cast to time_t.
2014-05-05Remove /tor/dbg-stability.txt URL.Karsten Loesing
The /tor/dbg-stability.txt URL was meant to help debug WFU and MTBF calculations, but nobody was using it. Fixes #11742.
2014-04-15Uplift status.c unit test coverage with new test cases and macros.dana koch
A new set of unit test cases are provided, as well as introducing an alternative paradigm and macros to support it. Primarily, each test case is given its own namespace, in order to isolate tests from each other. We do this by in the usual fashion, by appending module and submodule names to our symbols. New macros assist by reducing friction for this and other tasks, like overriding a function in the global namespace with one in the current namespace, or declaring integer variables to assist tracking how many times a mock has been called. A set of tests for a small-scale module has been included in this commit, in order to highlight how the paradigm can be used. This suite gives 100% coverage to status.c in test execution.
2014-03-27Renamed "onionskins_completed" to "onionskins_assigned"Nick Mathewson
This improves the accuracy of the function/variable names.
2014-03-05Rename PredictedCircsRelevanceTime->PredictedPortsRelevanceTimeNick Mathewson
All circuits are predictive; it's the ports that are expiring here.
2014-03-05Merge branch 'ticket9176_squashed'Nick Mathewson
Conflicts: doc/tor.1.txt
2014-03-05PredictedCircsRelevanceTime: limit how long we predict a port will be usedunixninja92
By default, after you've made a connection to port XYZ, we assume you might still want to have an exit ready to connect to XYZ for one hour. This patch lets you lower that interval. Implements ticket 91
2014-02-06Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
Conflicts: changes/bug10485 src/or/rephist.c src/or/status.c
2014-02-06Deliver circuit handshake counts as part of the heartbeatNick Mathewson
Previously, they went out once an hour, unconditionally. Fixes 10485; bugfix on 0.2.4.17-rc.
2013-12-24Merge remote-tracking branch 'public/bug10485'Nick Mathewson
2013-12-24Move onion-type stats message into heartbeatNick Mathewson
Fix for 10485. Fix on 0.2.4.17-alpha.
2013-09-05Merge branch 'maint-0.2.4'Roger Dingledine
2013-09-05collect and log statistics about onionskins received/processedRoger Dingledine
we skip onionskins that came from non-relays, so we're less likely to run into privacy troubles. starts to implement ticket 9658.
2013-08-15Rename circuit_get_global_list to remove trailing _Nick Mathewson
2013-06-20Fix #9108 - make global_circuitlist a doubly linked listMarek Majkowski
2013-05-24Extract duplicate code in geoip and rephist.Peter Retzlaff
Create new methods check_or_create_data_subdir() and write_to_data_subdir() in config.c and use them throughout rephist.c and geoip.c. This should solve ticket #4282.
2013-02-14Authorities were adding downtime for every relay every restartRoger Dingledine
Stop marking every relay as having been down for one hour every time we restart a directory authority. These artificial downtimes were messing with our Stable and Guard flag calculations. Fixes bug 8218 (introduced by the fix for 1035). Bugfix on 0.2.2.23-alpha.
2013-02-09Wrap more macro definitions in (parentheses)Nick Mathewson
To avoid surprises, good coding practice suggests parenthesizing every macro definition -- or at the very least, all those involving an expression.
2013-02-04When we mark a node as a sybil, mark it down and reset its uptime to 0Nick Mathewson
This prevents bug 8147, where such nodes would accrue points towards Guard, Fast, HSDir, and so on. Fixes bug 8147.
2013-02-01Rename log() to tor_log() for loggingNick Mathewson
This is meant to avoid conflict with the built-in log() function in math.h. It resolves ticket 7599. First reported by dhill. This was generated with the following perl script: #!/usr/bin/perl -w -i -p s/\blog\(LOG_(ERR|WARN|NOTICE|INFO|DEBUG)\s*,\s*/log_\L$1\(/g; s/\blog\(/tor_log\(/g;
2013-01-16Update the copyright date to 201.Nick Mathewson
2012-10-15Merge remote-tracking branch 'public/bug1031'Nick Mathewson