aboutsummaryrefslogtreecommitdiff
path: root/src/or/rephist.c
AgeCommit message (Collapse)Author
2019-03-14Merge remote-tracking branch 'tor-github/pr/771' into maint-0.3.4teor
2019-03-08Merge branch 'bug23512-v4-029-fixes-keep-typedef' into bug23512-v4-034-fixesteor
2018-11-15Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-11-15Merge branch 'maint-0.2.9' into maint-0.3.3Nick Mathewson
2018-09-20Fix a pair of errors in bug23512Nick Mathewson
2018-09-17Merge branch 'bug23512-v4-032' into bug23512-v4-033Mike Perry
2018-09-17Merge branch 'bug23512-v4-029' into bug23512-v4-032Mike Perry
2018-09-17Bug 23512: Test recording bytes in circ queues.Mike Perry
2018-09-17Promote rep_hist bw functions to uint64_t.Mike Perry
The rest of rephist uses uint64_t internally. Let's make these take it too, so we don't have to worry about overflowing size_t on 32 bit systems.
2018-09-01Allow mocking rep_hist_bandwidth_assessjuga0
2018-05-03Merge remote-tracking branch 'isis/bug24660_r1'Nick Mathewson
2018-04-27Move or_state_mark_dirty into statefile.cNick Mathewson
Previously it was an inline function in or.h
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2018-02-20Remove a bunch of other redundant #includesNick Mathewson
Folks have found two in the past week or so; we may as well fix the others. Found with: \#!/usr/bin/python3 import re def findMulti(fname): includes = set() with open(fname) as f: for line in f: m = re.match(r'^\s*#\s*include\s+["<](\S+)[>"]', line) if m: inc = m.group(1) if inc in includes: print("{}: {}".format(fname, inc)) includes.add(m.group(1)) import sys for fname in sys.argv[1:]: findMulti(fname)
2018-02-07Merge remote-tracking branch 'dgoulet/ticket25163_033_01'Nick Mathewson
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2018-02-06rephist: Stop tracking relay connection statusDavid Goulet
Remove a series of connection counters that were only used when dumping the rephist statistics with SIGUSR1 signal. This reduces the or_history_t structure size. Closes #25163 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-06rephist: Stop tracking EXTEND attemptsDavid Goulet
This removes the code that tracks the extend attemps a client makes. We don't use it and it was only used to provide statistics on a SIGUSR1 from the rephist dump stats function. Part of #25163 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-11Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-12-11Merge branch 'maint-0.2.5' into maint-0.2.8Nick Mathewson
2017-12-11Merge branch 'maint-0.3.2'Nick Mathewson
2017-12-11Merge branch 'stack_fixes_032_v2' into maint-0.3.2Nick Mathewson
2017-12-11Move subtraction in rephist to try to avoid STACK warningNick Mathewson
(I do not know why this one is happening)
2017-12-08Merge branch 'macro_free_v2_squashed'Nick Mathewson
2017-12-08Convert remaining function (mostly static) to new free styleNick Mathewson
2017-11-27Merge branch 'ticket23856_025_01' into maint-0.3.2Nick Mathewson
2017-11-27relay: Change bandwidth stats interval to 24 hoursDavid Goulet
Going from 4 hours to 24 hours in order to try reduce the efficiency of guard discovery attacks. Closes #23856 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15Merge branch 'maint-0.3.1'Nick Mathewson
Resolve conflict with 23532 code.
2017-09-15Fix several places where md-using relays would get wrong behavior.Nick Mathewson
This patch replaces a few calls to router_get_by_id_digest ("do we have a routerinfo?") with connection_or_digest_is_known_relay ("do we know this relay to be in the consensus, or have been there some time recently?"). Found while doing the 21585 audit; fixes bug 23533. Bugfix on 0.3.0.1-alpha.
2017-08-24Apply ahf's ceil_div.cocci patch.Nick Mathewson
2017-07-13rephist: Remove unused crypto_pk statistics.Isis Lovecruft
These statistics were largely ununsed, and kept track of statistical information on things like how many time we had done TLS or how many signatures we had verified. This information is largely not useful, and would only be logged after receiving a SIGUSR1 signal (but only if the logging severity level was less than LOG_INFO). * FIXES #19871. * REMOVES note_crypto_pk_op(), dump_pk_op(), and pk_op_counts from src/or/rephist.c. * REMOVES every external call to these functions.
2017-05-09Add a check and a cast in rephist.c to fix a warningNick Mathewson
2017-05-08Merge branch 'netflow_padding-v6-rebased2-squashed'Nick Mathewson
2017-05-08Bug 17592: Clean up connection timeout logic.Mike Perry
This unifies CircuitIdleTimeout and PredictedCircsRelevanceTime into a single option, and randomizes it. It also gives us control over the default value as well as relay-to-relay connection lifespan through the consensus. Conflicts: src/or/circuituse.c src/or/config.c src/or/main.c src/test/testing_common.c
2017-05-08Netflow record collapsing defense.Mike Perry
This defense will cause Cisco, Juniper, Fortinet, and other routers operating in the default configuration to collapse netflow records that would normally be split due to the 15 second flow idle timeout. Collapsing these records should greatly reduce the utility of default netflow data for correlation attacks, since all client-side records should become 30 minute chunks of total bytes sent/received, rather than creating multiple separate records for every webpage load/ssh command interaction/XMPP chat/whatever else happens to be inactive for more than 15 seconds. The defense adds consensus parameters to govern the range of timeout values for sending padding packets, as well as for keeping connections open. The defense only sends padding when connections are otherwise inactive, and it does not pad connections used solely for directory traffic at all. By default it also doesn't pad inter-relay connections. Statistics on the total padding in the last 24 hours are exported to the extra-info descriptors.
2017-03-15Run the copyright update script.Nick Mathewson
2016-10-17Write a bunch of module documentation.Nick Mathewson
This commit adds or improves the module-level documenation for: buffers.c circuitstats.c command.c connection_edge.c control.c cpuworker.c crypto_curve25519.c crypto_curve25519.h crypto_ed25519.c crypto_format.c dircollate.c dirserv.c dns.c dns_structs.h fp_pair.c geoip.c hibernate.c keypin.c ntmain.c onion.c onion_fast.c onion_ntor.c onion_tap.c periodic.c protover.c protover.h reasons.c rephist.c replaycache.c routerlist.c routerparse.c routerset.c statefile.c status.c tor_main.c workqueue.c In particular, I've tried to explain (for each documented module) what each module does, what's in it, what the big idea is, why it belongs in Tor, and who calls it. In a few cases, I've added TODO notes about refactoring opportunities. I've also renamed an argument, and fixed a few DOCDOC comments.
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