This is an automated email from the git hooks/post-receive script.
dgoulet pushed a change to branch main in repository tor.
from c733ccda99 Merge branch 'tor-gitlab/mr/579' new 419aa78b3a Remove unused RendPostPeriod option new 5d2dc2d403 Add changes file for ticket #40431 new 15e5b203cd Merge branch 'tor-gitlab/mr/594' new 75d12dffe7 Remove `BUG()` in Windows process read callback. new b04705305b Merge branch 'tor-gitlab/mr/649'
The 5 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
Summary of changes: changes/bug40431 | 4 +++ changes/ticket40596 | 4 +++ doc/man/tor.1.txt | 1 - src/app/config/config.c | 24 -------------- src/app/config/or_options_st.h | 2 -- src/app/config/testnet.inc | 1 - src/feature/hs/hs_cache.c | 7 ++-- src/lib/process/process_win32.c | 2 +- src/test/conf_examples/large_1/expected | 1 - src/test/conf_examples/large_1/expected_no_dirauth | 1 - src/test/conf_examples/large_1/torrc | 1 - src/test/test_options.c | 38 ---------------------- 12 files changed, 13 insertions(+), 73 deletions(-) create mode 100644 changes/bug40431 create mode 100644 changes/ticket40596
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 419aa78b3acbc5c407b02509e82e473d8bda5d35 Author: Neel Chauhan neel@neelc.org AuthorDate: Wed Aug 18 18:38:20 2021 -0700
Remove unused RendPostPeriod option --- doc/man/tor.1.txt | 1 - src/app/config/config.c | 24 -------------- src/app/config/or_options_st.h | 2 -- src/app/config/testnet.inc | 1 - src/feature/hs/hs_cache.c | 7 ++-- src/test/conf_examples/large_1/expected | 1 - src/test/conf_examples/large_1/expected_no_dirauth | 1 - src/test/conf_examples/large_1/torrc | 1 - src/test/test_options.c | 38 ---------------------- 9 files changed, 4 insertions(+), 72 deletions(-)
diff --git a/doc/man/tor.1.txt b/doc/man/tor.1.txt index 6a4afc0bbd..5f6a946b20 100644 --- a/doc/man/tor.1.txt +++ b/doc/man/tor.1.txt @@ -3562,7 +3562,6 @@ The following options are used for running a testing Tor network. TestingDirConnectionMaxStall 30 seconds TestingEnableConnBwEvent 1 TestingEnableCellStatsEvent 1 - RendPostPeriod 2 minutes
[[TestingAuthDirTimeToLearnReachability]] **TestingAuthDirTimeToLearnReachability** __N__ **seconds**|**minutes**|**hours**:: After starting as an authority, do not make claims about whether routers diff --git a/src/app/config/config.c b/src/app/config/config.c index 15addd5be4..a3382c761b 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -624,7 +624,6 @@ static const config_var_t option_vars_[] = { V(RejectPlaintextPorts, CSV, ""), V(RelayBandwidthBurst, MEMUNIT, "0"), V(RelayBandwidthRate, MEMUNIT, "0"), - V(RendPostPeriod, INTERVAL, "1 hour"), /* Used internally. */ V(RephistTrackTime, INTERVAL, "24 hours"), V_IMMUTABLE(RunAsDaemon, BOOL, "0"), V(ReducedExitPolicy, BOOL, "0"), @@ -2974,19 +2973,11 @@ config_ensure_bandwidth_cap(uint64_t *value, const char *desc, char **msg) return 0; }
-/** Lowest allowable value for RendPostPeriod; if this is too low, hidden - * services can overload the directory system. */ -#define MIN_REND_POST_PERIOD (10*60) -#define MIN_REND_POST_PERIOD_TESTING (5) - /** Highest allowable value for CircuitsAvailableTimeout. * If this is too large, client connections will stay open for too long, * incurring extra padding overhead. */ #define MAX_CIRCS_AVAILABLE_TIME (24*60*60)
-/** Highest allowable value for RendPostPeriod. */ -#define MAX_DIR_PERIOD ((7*24*60*60)/2) - /** Lowest allowable value for MaxCircuitDirtiness; if this is too low, Tor * will generate too many circuits and potentially overload the network. */ #define MIN_MAX_CIRCUIT_DIRTINESS 10 @@ -3546,21 +3537,6 @@ options_validate_cb(const void *old_options_, void *options_, char **msg) if (options_validate_relay_padding(old_options, options, msg) < 0) return -1;
- const int min_rendpostperiod = - options->TestingTorNetwork ? - MIN_REND_POST_PERIOD_TESTING : MIN_REND_POST_PERIOD; - if (options->RendPostPeriod < min_rendpostperiod) { - log_warn(LD_CONFIG, "RendPostPeriod option is too short; " - "raising to %d seconds.", min_rendpostperiod); - options->RendPostPeriod = min_rendpostperiod; - } - - if (options->RendPostPeriod > MAX_DIR_PERIOD) { - log_warn(LD_CONFIG, "RendPostPeriod is too large; clipping to %ds.", - MAX_DIR_PERIOD); - options->RendPostPeriod = MAX_DIR_PERIOD; - } - /* Check the Single Onion Service options */ if (options_validate_single_onion(options, msg) < 0) return -1; diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h index 290a2bb9b4..0811af1388 100644 --- a/src/app/config/or_options_st.h +++ b/src/app/config/or_options_st.h @@ -396,8 +396,6 @@ struct or_options_t { /** List of suffixes for <b>AutomapHostsOnResolve</b>. The special value * "." means "match everything." */ struct smartlist_t *AutomapHostsSuffixes; - int RendPostPeriod; /**< How often do we post each rendezvous service - * descriptor? Remember to publish them independently. */ int KeepalivePeriod; /**< How often do we send padding cells to keep * connections alive? */ int SocksTimeout; /**< How long do we let a socks connection wait diff --git a/src/app/config/testnet.inc b/src/app/config/testnet.inc index 039454a0d0..2774a4c8ea 100644 --- a/src/app/config/testnet.inc +++ b/src/app/config/testnet.inc @@ -30,5 +30,4 @@ { "TestingDirConnectionMaxStall", "30 seconds" }, { "TestingEnableConnBwEvent", "1" }, { "TestingEnableCellStatsEvent", "1" }, -{ "RendPostPeriod", "2 minutes" }, { "___UsingTestNetworkDefaults", "1" }, diff --git a/src/feature/hs/hs_cache.c b/src/feature/hs/hs_cache.c index cf8e377313..dcca1d7086 100644 --- a/src/feature/hs/hs_cache.c +++ b/src/feature/hs/hs_cache.c @@ -1081,7 +1081,7 @@ hs_cache_handle_oom(time_t now, size_t min_remove_bytes) * * 1) Deallocate all entries from v3 cache that are older than K hours * 2.1) If the amount of remove bytes has been reached, stop. - * 2) Set K = K - RendPostPeriod and repeat process until K is < 0. + * 2) Set K = K - 1 hour and repeat process until K is < 0. * * This ends up being O(Kn). */ @@ -1104,8 +1104,9 @@ hs_cache_handle_oom(time_t now, size_t min_remove_bytes) if (bytes_removed < min_remove_bytes) { /* We haven't remove enough bytes so clean v3 cache. */ bytes_removed += cache_clean_v3_as_dir(now, cutoff); - /* Decrement K by a post period to shorten the cutoff. */ - k -= get_options()->RendPostPeriod; + /* Decrement K by a post period to shorten the cutoff, Two minutes + * if we are a testing network, or one hour otherwise. */ + k -= get_options()->TestingTorNetwork ? 120 : 3600; } } while (bytes_removed < min_remove_bytes);
diff --git a/src/test/conf_examples/large_1/expected b/src/test/conf_examples/large_1/expected index fcd19db3df..73e48cf0d3 100644 --- a/src/test/conf_examples/large_1/expected +++ b/src/test/conf_examples/large_1/expected @@ -126,7 +126,6 @@ ReachableORAddresses 128.0.0.0/8 RejectPlaintextPorts 23 RelayBandwidthBurst 10000 RelayBandwidthRate 1000 -RendPostPeriod 600 RephistTrackTime 600 SafeLogging 0 Schedulers Vanilla,KISTLite,Kist diff --git a/src/test/conf_examples/large_1/expected_no_dirauth b/src/test/conf_examples/large_1/expected_no_dirauth index 4a19bc546c..21f08d0a33 100644 --- a/src/test/conf_examples/large_1/expected_no_dirauth +++ b/src/test/conf_examples/large_1/expected_no_dirauth @@ -125,7 +125,6 @@ ReachableORAddresses 128.0.0.0/8 RejectPlaintextPorts 23 RelayBandwidthBurst 10000 RelayBandwidthRate 1000 -RendPostPeriod 600 RephistTrackTime 600 SafeLogging 0 Schedulers Vanilla,KISTLite,Kist diff --git a/src/test/conf_examples/large_1/torrc b/src/test/conf_examples/large_1/torrc index 3f5b1e179f..ebf4a3fb96 100644 --- a/src/test/conf_examples/large_1/torrc +++ b/src/test/conf_examples/large_1/torrc @@ -133,7 +133,6 @@ ReachableORAddresses 128.0.0.0/8 RejectPlaintextPorts 23 RelayBandwidthBurst 10000 RelayBandwidthRate 1000 -RendPostPeriod 10 minutes RephistTrackTime 10 minutes SafeLogging 0 SafeSocks 0 diff --git a/src/test/test_options.c b/src/test/test_options.c index 182e6dd572..6610e317a7 100644 --- a/src/test/test_options.c +++ b/src/test/test_options.c @@ -2005,43 +2005,6 @@ test_options_validate__testing(void *ignored) tor_free(msg); }
-static void -test_options_validate__hidserv(void *ignored) -{ - (void)ignored; - int ret; - char *msg; - setup_capture_of_logs(LOG_WARN); - - options_test_data_t *tdata = NULL; - - free_options_test_data(tdata); - tdata = get_options_test_data("RendPostPeriod 1\n" ); - mock_clean_saved_logs(); - ret = options_validate(NULL, tdata->opt, &msg); - tt_int_op(ret, OP_EQ, 0); - expect_log_msg("RendPostPeriod option is too short;" - " raising to 600 seconds.\n"); - tt_int_op(tdata->opt->RendPostPeriod, OP_EQ, 600); - tor_free(msg); - - free_options_test_data(tdata); - tdata = get_options_test_data("RendPostPeriod 302401\n" ); - mock_clean_saved_logs(); - ret = options_validate(NULL, tdata->opt, &msg); - tt_int_op(ret, OP_EQ, 0); - expect_log_msg("RendPostPeriod is too large; " - "clipping to 302400s.\n"); - tt_int_op(tdata->opt->RendPostPeriod, OP_EQ, 302400); - tor_free(msg); - - done: - teardown_capture_of_logs(); - policies_free_all(); - free_options_test_data(tdata); - tor_free(msg); -} - static void test_options_validate__path_bias(void *ignored) { @@ -4270,7 +4233,6 @@ struct testcase_t options_tests[] = { LOCAL_VALIDATE_TEST(safe_logging), LOCAL_VALIDATE_TEST(publish_server_descriptor), LOCAL_VALIDATE_TEST(testing), - LOCAL_VALIDATE_TEST(hidserv), LOCAL_VALIDATE_TEST(path_bias), LOCAL_VALIDATE_TEST(bandwidth), LOCAL_VALIDATE_TEST(circuits),
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 5d2dc2d403f342ac495897ed57c29a30b2813634 Author: Neel Chauhan neel@neelc.org AuthorDate: Wed Aug 18 18:43:03 2021 -0700
Add changes file for ticket #40431 --- changes/bug40431 | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/changes/bug40431 b/changes/bug40431 new file mode 100644 index 0000000000..fbc3bb5ca0 --- /dev/null +++ b/changes/bug40431 @@ -0,0 +1,4 @@ + o Removed features: + - Remove the RendPostPeriod option. This was primarily used in Version 2 + Onion Services and after its deprecation isn't needed anymore. Closes + ticket 40431. Patch by Neel Chauhan.
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 75d12dffe707d6861485092e0a87db6384a87252 Author: Alexander Færøy ahf@torproject.org AuthorDate: Tue Nov 1 10:45:17 2022 +0100
Remove `BUG()` in Windows process read callback.
This BUG() was added when the code was written to see if this callback was ever executed after we marked the handle as EOF. It turns out, it does, but we handle it gracefully. We can therefore remove the BUG().
Fixes tpo/core/tor#40596. --- changes/ticket40596 | 4 ++++ src/lib/process/process_win32.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/changes/ticket40596 b/changes/ticket40596 new file mode 100644 index 0000000000..13c8e5b34a --- /dev/null +++ b/changes/ticket40596 @@ -0,0 +1,4 @@ + o Minor bugfixes (pluggable transports, windows): + - Remove a warning `BUG()` that could occur when attempting to execute a + non-existing pluggable transport on Windows. Fixes bug 40596; bugfix on + 0.4.0.1-alpha. diff --git a/src/lib/process/process_win32.c b/src/lib/process/process_win32.c index dfcb17a480..6458f93752 100644 --- a/src/lib/process/process_win32.c +++ b/src/lib/process/process_win32.c @@ -888,7 +888,7 @@ process_win32_read_from_handle(process_win32_handle_t *handle,
/* Check if we have been asked to read from a handle that have already told * us that we have reached the end of the file. */ - if (BUG(handle->reached_eof)) + if (handle->reached_eof) return 0;
/* This cast should be safe since our buffer can be at maximum up to
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit 15e5b203cd248c066c01fdb23cd50c8554c26543 Merge: c733ccda99 5d2dc2d403 Author: David Goulet dgoulet@torproject.org AuthorDate: Tue Nov 1 09:11:29 2022 -0400
Merge branch 'tor-gitlab/mr/594'
changes/bug40431 | 4 +++ doc/man/tor.1.txt | 1 - src/app/config/config.c | 24 -------------- src/app/config/or_options_st.h | 2 -- src/app/config/testnet.inc | 1 - src/feature/hs/hs_cache.c | 7 ++-- src/test/conf_examples/large_1/expected | 1 - src/test/conf_examples/large_1/expected_no_dirauth | 1 - src/test/conf_examples/large_1/torrc | 1 - src/test/test_options.c | 38 ---------------------- 10 files changed, 8 insertions(+), 72 deletions(-)
This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
commit b04705305b135526b1f8cbfc1d4c3baab866e63f Merge: 15e5b203cd 75d12dffe7 Author: David Goulet dgoulet@torproject.org AuthorDate: Tue Nov 1 09:14:33 2022 -0400
Merge branch 'tor-gitlab/mr/649'
changes/ticket40596 | 4 ++++ src/lib/process/process_win32.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
tor-commits@lists.torproject.org