summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-02-07Remove anything related to the old SocksSockets optionDavid Goulet
At this commit, the SocksSocketsGroupWritable option is renamed to UnixSocksGroupWritable. A deprecated warning is triggered if the old option is used and tor will use it properly. Fixes #24343 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-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>
2018-02-01Tweaks into functions and variables in crypto_rsa.[ch]Fernando Fernandez Mancera
crypto_get_rsa_padding_overhead() and crypto_get_rsa_padding() are not static inline anymore in order to split the crypto_rsa module from crypto.[ch]. Also included necessary modules in order to solve dependency issues. Also made two functions in crypto.c use crypto_pk_asn1_encdoe() instead of reaching into the crypto_pk_t struct.
2018-02-01Remove commented functions in crypto module.Fernando Fernandez Mancera
OpenSSL never uses these callbacks anymore so the code is disabled. Fixes #25097. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-02-01Remove nodelist_recompute_all_hsdir_indices() as unused.Nick Mathewson
Closes 25108.
2018-02-01Revert "Change the sandbox behavior on all failed opens() to EACCES"Nick Mathewson
This reverts commit 9a06282546418b2e9d21559d4853bcf124b953f4. It appears that I misunderstood how the seccomp2 filter rules interact. It appears that `SCMP_ACT_ERRNO()` always takes precedence over `SCMP_ACT_ALLOW()` -- I had thought instead that earlier rules would override later ones. But this change caused bug 25115 (not in any released Tor).
2018-02-01Merge remote-tracking branch 'dgoulet/bug24469_033_01'Nick Mathewson
2018-02-01Merge branch 'maint-0.3.2'Nick Mathewson
2018-02-01Merge remote-tracking branch 'dgoulet/bug24975_032_01' into maint-0.3.2Nick Mathewson
2018-01-31Merge remote-tracking branch 'dgoulet/ticket24902_029_05'Nick Mathewson
2018-01-31channel_tls_get_remote_addr_method now returns real_addr.Fernando Fernandez Mancera
The accurate address of a connection is real_addr, not the addr member. channel_tls_get_remote_addr_method() now returns real_addr instead. Fixes #24952; bugfix on 707c1e2 in 0.2.4.11-alpha. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2018-01-31circ: Don't cannibalize a circuit if the guard state is unusableDavid Goulet
Tor preemptiely builds circuits and they can be cannibalized later in their lifetime. A Guard node can become unusable (from our guard state) but we can still have circuits using that node opened. It is important to not pick those circuits for any usage through the cannibalization process. Fixes #24469 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-31Merge remote-tracking branch 'public/bug16106_02_nm'Nick Mathewson
2018-01-31Merge branch 'bug23954_squashed'Nick Mathewson
2018-01-31Use thread-safe types to store the LOG_PROTOCOL_WARN severityNick Mathewson
Fixes a race condition; resolves 23954.