aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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 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.2'Nick Mathewson
2018-02-01Merge branch 'maint-0.3.1' into maint-0.3.2Nick 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 '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.
2018-01-31Look at the correct protocol for supports_v3_rendezvous_pointNick Mathewson
Fixes bug 25105; bugfix on 0.3.2.1-alpha.
2018-01-31Revert "ns: Call notify_networkstatus_changed() after the new consensus is ↵David Goulet
set globally" This reverts commit 3a247ca92a06c864a2cb634fbe2bc23cf48fb977.
2018-01-31Document remaining cases for protocol supportNick Mathewson
For each support flag, document which subprotocol version it requires.
2018-01-31Merge branch 'maint-0.3.2'Nick Mathewson
2018-01-31Merge remote-tracking branch 'dgoulet/bug24975_032_01' into maint-0.3.2Nick Mathewson
2018-01-31sched: Avoid adding the same channel twice to the KIST pending listDavid Goulet
This is the quick fix that is keeping the channel in PENDING state so if we ever try to reschedule the same channel, it won't happened. Fixes #24700 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-31Merge branch 'maint-0.3.2'Nick Mathewson
2018-01-31hs-v3: Remove a BUG() when storing a descriptor in the client cacheDavid Goulet
It is possible in normal circumstances that a client fetches a descriptor that has a lower revision counter than the one in its cache. This can happen due to HSDir desync. Fixes #24976 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-31ns: Call notify_networkstatus_changed() after the new consensus is set globallyDavid Goulet
In 0.3.2.1-alpha, we've added this function in order to have a way to notify other subsystems that the consensus just changed. The old consensus and the new one 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. With this commit, notify_networkstatus_changed() has been moved _after_ the new consensus is set globally. The main obvious reasons is to fix the bug described above and in #24975. The other reason is that this notify function doesn't return anything which could be allowing the possibility of refusing to set the new consensus on error. In other words, the new consensus is set right after the notification whatever happens. It does no harm or change in behavior to set the new consensus first and then notify the subsystems. The two functions currently used are for the control port using the old and new consensus and sending the diff. The second is the scheduler that needs the new consensus to be set globally before being called. Of course, the function has been documented accordinly to clearly state it is done _after_ the new consensus is set. Fixes #24975 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-31Merge branch 'maint-0.3.2'Nick Mathewson
2018-01-31Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-01-31But in most Earth cultures, there are 60s in a minute.Nick Mathewson
2018-01-31Merge branch 'maint-0.3.2'Nick Mathewson
2018-01-31Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-01-31add a rate-limit.Nick Mathewson
2018-01-31Merge branch 'maint-0.3.2'Nick Mathewson
2018-01-31Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-01-31Merge branch 'bug24927'Nick Mathewson
2018-01-31Merge remote-tracking branch 'public/ticket24849_032'Nick Mathewson
2018-01-31Merge remote-tracking branch 'dgoulet/ticket24902_029_05'Nick Mathewson
2018-01-31test: Add unit tests for overflows and underflows in cc_stats_refill_bucketteor
Closes #25094. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-31dos: Make sure cc_stats_refill_bucket can't overflow while calculatingteor
Debug log the elapsed time in cc_stats_refill_bucket Part of #25094. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-31Merge branch 'maint-0.3.2'Nick Mathewson
2018-01-31test: Remove a redundant round from test_dos_bucket_refillteor
This round is left over from the tenths of a second code. Part of #25094.