aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-02-07Improve doc of `primary_guards_up_to_date`.George Kadianakis
2018-02-06Merge remote-tracking branch 'dgoulet/bug25116_029_01'Nick Mathewson
2018-02-06Merge branch 'arma_bug22212_031'Nick Mathewson
2018-02-06Add a category for the 22212-forreal changes fileNick 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-02Merge branch 'bug25125_032_01_squashed' into maint-0.3.2Nick 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-01Merge branch 'maint-0.3.2'Nick Mathewson
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.
2018-01-31Merge branch 'maint-0.3.2'Nick Mathewson
"ours" merge to avoid backport of #25105
2018-01-31Merge branch 'bug25105_032' into maint-0.3.2Nick Mathewson
2018-01-31Merge branch 'bug25008'Nick Mathewson
2018-01-31ns: Add a before and after consensus has changed notificationDavid Goulet
In 0.3.2.1-alpha, we've added notify_networkstatus_changed() in order to have a way to notify other subsystems that the consensus just changed. The old and new consensus are passed to it. Before this patch, this was done _before_ the new consensus was set globally (thus NOT accessible by getting the latest consensus). The scheduler notification was assuming that it was set and select_scheduler() is looking at the latest consensus to get the parameters it might needs. This was very wrong because at that point it is still the old consensus set globally. This commit changes the notify_networkstatus_changed() to be the "before" function and adds an "after" notification from which the scheduler subsystem is notified. Fixes #24975
2018-01-31Look at the correct protocol for supports_v3_rendezvous_pointNick Mathewson
Fixes bug 25105; bugfix on 0.3.2.1-alpha. (This is a backport of bbf2d9cf6bb97c3e15ada58 for 0.3.2.)
2018-01-31Fix a failing unit test.Nick Mathewson
When we stopped looking at the "protocols" variable directly, we broke the hs_service/build_update_descriptors test, since it didn't actually update any of the flags. The fix here is to call summarize_protover_flags() from that test, and to expose summarize_protover_flags() as "STATIC" from routerparse.c.