summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-02-10rust: Add macro for passing static borrowed strings from Rust to C.Isis Lovecruft
* ADD a new macro, tor_util::string::cstr!() which takes Rust strings, concatenates them together, appends a NUL byte, and converts it into a std::ffi::CStr for handing to C.
2018-02-10rust: Replace two `unwrap()`s in FFI code with `unwrap_or()`s.Isis Lovecruft
2018-02-08Merge remote-tracking branch 'frewsxcv/frewsxcv-protover'Nick Mathewson
2018-02-08Stop claiming that compute_for_old_tor() returns pairsNick Mathewson
2018-02-08Remove new unsafe {} use.Nick Mathewson
Rationale: this helps for performance only, but we don't actually have any reason to think that the checks here are performance-critical. Let's not normalize the use of unsafe {}.
2018-02-08Merge remote-tracking branch 'isis/bug25127'Nick Mathewson
2018-02-08Merge branch 'maint-0.3.2'Nick Mathewson
2018-02-08Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-02-08Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-02-08Merge branch 'maint-0.2.5' into maint-0.2.9Nick Mathewson
2018-02-08dirserv: Improve returned message when relay is rejectedDavid Goulet
Explicitly inform the operator of the rejected relay to set a valid email address in the ContactInfo field and contact bad-relays@ mailing list. Fixes #25170 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-08Update geoip and geoip6 to the February 7 2018 database.Karsten Loesing
2018-02-07protover: Fix memleak in Rust impl of protover_compute_for_old_tor.Isis Lovecruft
* FIXES #25127: https://bugs.torproject.org/25127 * ADDS a new module to the Rust tor_util crate for small utilities for working with static strings between languages. * CHANGES the return type of protover_compute_for_old_tor to point to immutable data. * CHANGES the code from the previous commit to use the new static string utilities.
2018-02-07remove blank line between function-comment and functionRoger Dingledine
also be more consistent about punctuation in doxygen comments
2018-02-07Merge remote-tracking branch 'dgoulet/ticket25163_033_01'Nick Mathewson
2018-02-07more fixes for typos, grammar, whitespace, etcRoger Dingledine
some of these ought to have been noticed by the "misspell" tool, so if anybody is debugging it, here are some bug reports :)
2018-02-07Merge remote-tracking branch 'dgoulet/bug25113_029_01'Nick Mathewson
2018-02-07test: Bump to 10 msec gap in the monotonic testDavid Goulet
On slow system, 1 msec between one read and the other was too tight. For instance, it failed on armel with a 4msec gap: https://buildd.debian.org/status/package.php?p=tor&suite=experimental Increase to 10 msec for now to address slow system. It is important that we keep this OP_LE test in so we make sure the msec/usec/nsec read aren't desynchronized by huge gaps. We'll adjust again if we ever encounter a system that goes slower than 10 msec between calls. Fixes #25113 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-07Fix wide lines from typo-fix patch.Nick Mathewson
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2018-02-07Improve doc of `primary_guards_up_to_date`.George Kadianakis
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>
2018-02-06Merge remote-tracking branch 'dgoulet/bug25116_029_01'Nick Mathewson
2018-02-06Merge remote-tracking branch 'arma/bug22212'Nick Mathewson
2018-02-06protover: Fix memleak in Rust implementation.Isis Lovecruft
* FIXES #25127: https://bugs.torproject.org/25127.
2018-02-05Merge remote-tracking branch 'dgoulet/ticket24902_029_05'Nick Mathewson
2018-02-05Make circuit_log_ancient_one_hop_circuits() ignore established service ↵David Goulet
rendezvous Services can keep rendezvous circuits for a while so don't log them if tor is a single onion service. Fixes #25116 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-05geoip: Make geoip_client_cache_total_allocation() return the counterDavid Goulet
The HT_FOREACH() is insanely heavy on the CPU and this is part of the fast path so make it return the nice memory size counter we added in 4d812e29b9b1ec88. Fixes #25148 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-05Merge remote-tracking branch 'dgoulet/ticket24902_029_05'Nick Mathewson
2018-02-02fuzz: Move init_protocol_warning_severity_level() into global_init()Nick Mathewson
This is needed so llvm_fuzz will see it too.
2018-02-02dos: We can put less token than the current amountDavid Goulet
Becasue the circuit creation burst and rate can change at runtime it is possible that between two refill of a bucket, we end up setting the bucket value to less than there currently is. Fixes #25128 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-02Use tt_u64_op() for uint64_t inputs.Nick Mathewson
2018-02-02Merge remote-tracking branch 'dgoulet/ticket24902_029_05'Nick Mathewson
2018-02-02Merge branch 'ticket25122_029_02' into ticket24902_029_05David Goulet
2018-02-02geoip: Add clientmap_entry_new() functionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-02geoip: Increment and decrement functions for the geoip client cacheDavid Goulet
These functions protect againts over and underflow. They BUG() in case we overflow the counter. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-02geoip: Hook the client history cache into the OOM handlerDavid Goulet
If the cache is using 20% of our maximum allowed memory, clean 10% of it. Same behavior as the HS descriptor cache. Closes #25122 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-02Merge branch 'maint-0.3.2'Nick Mathewson
2018-02-02sched: When releasing a channel, do not BUG() if absent from the pending listDavid Goulet
The current code flow makes it that we can release a channel in a PENDING state but not in the pending list. This happens while the channel is being processed in the scheduler loop. Fixes #25125 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-01test: KIST Scheduler unit tests to test the pending list stateDavid Goulet
This tests many cases of the KIST scheduler with the pending list state by calling entry point in the scheduler while channels are scheduled or not. Also, it adds a test for the bug #24700. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-01Merge remote-tracking branch 'dgoulet/bug24700_032_01' into maint-0.3.2Nick Mathewson
2018-02-01Merge branch 'bug24700_032_01' into bug24700_033_01David Goulet
2018-02-01sched: Use the sched_heap_idx field to double-check our fix for 24700.Nick Mathewson
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-01Merge remote-tracking branch 'teor/bug25070'Nick Mathewson
2018-02-01Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-02-01Merge branch 'maint-0.3.2'Nick Mathewson
2018-02-01Merge remote-tracking branch 'teor/bug25070_031' into maint-0.3.1Nick Mathewson
2018-02-01Merge branch 'bug24658-rsa_squashed'Nick Mathewson
2018-02-01Add crypto_rsa.[ch] to include.amFernando Fernandez Mancera
Included crypto_rsa.[ch] into include.am in order to resolve a compiling issue. Follows #24658. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>