aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_relay.c
AgeCommit message (Collapse)Author
2021-06-14Merge remote-tracking branch 'tor-gitlab/mr/338'Nick Mathewson
2021-03-17Add a MinTimeToReportBandwidth option; make it 0 for testing networks.Nick Mathewson
This option changes the time for which a bandwidth measurement period must have been in progress before we include it when reporting our observed bandwidth in our descriptors. Without this option, we only consider a time period towards our maximum if it has been running for a full day. Obviously, that's unacceptable for testing networks, where we'd like to get results as soon as possible. For non-testing networks, I've put a (somewhat arbitrary) 2-hour minimum on the option, since there are traffic analysis concerns with immediate reporting here. Closes #40337.
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-01-27relay: Skip address discovery if no ORPort is foundDavid Goulet
In other words, if we don't have an ORPort configured for a specific family (IPv4/v6), we don't bother doing address discovery. Related to #40254 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-24relay: Turn find address "method_used" into enumDavid Goulet
Enum allows us to easily compare what is being returned but also better semantic to the code. Related #33247 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-21relay: Add AddressDisableIPv6 torrc optionDavid Goulet
This option controls if a tor relay will attempt address auto discovery and thus ultimately publish an IPv6 ORPort in the descriptor. Behavior is from proposal 312 section 3.2.6. Closes #33245 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-20relay: Use flags in relay_find_addr_to_publish()David Goulet
Instead of a boolean saying "cache_only" add the concept of flags so we add semantic through out the code and allow ourselves to have more options in the future. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-20addr: Use false/true with relay_find_addr_to_publish()David Goulet
Previous development introduced the error of using 0/1 for a boolean parameter. Fix that everywhere Related #40025 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-20test: Unit test for relay_find_addr_to_publish()David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-20test: Unit test for relay_address_new_suggestion()David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-10Split bandwidth history functions into a separate C file.Nick Mathewson
These are logically independent from the rest of rephist, and make more sense in isolation. The next patch will rename them too.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-20Code Style: Delete headers that are included twiceteor
These changes were created using the "make autostyle" from 32522, and then split into commits.
2019-10-28test: Add fakecircs.{h|c} helperDavid Goulet
Fake circuits are created everywhere in the unit tests. This is an attempt at centralizing a "fake circuit creation" API like fakechans.c does for channel. This commit introduces fakecircs.c and changes test_relay.c and test_circpadding.c which were using roughly the same code. This will allow easier OR circuit creation for the future tests in test_circuitmux.c Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-09-20Merge branch 'bug23512-v4-029-fixes'Nick Mathewson
2018-09-20Merge branch 'bug23512-v4-029-fixes'Nick Mathewson
2018-09-20Fix a pair of errors in bug23512Nick Mathewson
2018-09-18Merge branch 'bug23512-v4-033' into bug23512-v4-masterMike Perry
2018-09-17Bug 23512: Test fix: cmux is now allocated by new_fake_channel()Mike Perry
2018-09-17Merge branch 'bug23512-v4-032' into bug23512-v4-033Mike Perry
2018-09-17Bug 23512: Mock assert_circuit_ok in tests.Mike Perry
This mocking was not available in 0.2.9.
2018-09-17Merge branch 'bug23512-v4-029' into bug23512-v4-032Mike Perry
2018-09-17Bug 23512: Test recording bytes in circ queues.Mike Perry
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-01Extract more constants from or.hNick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Extract cell type and their queues into new headersNick Mathewson
Since packed_cell and destroy_cell exist only to be queued, they go in the same headers as the queues.
2018-06-15Extract {or,origin}_circuit_t into their own headersNick Mathewson
2017-11-22test: Fix memleak of channel cmuxDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24Fix operator usage in src/test/*.cAlexander Færøy
This patch fixes the operator usage in src/test/*.c to use the symbolic operators instead of the normal C comparison operators. This patch was generated using: ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch]
2017-03-15Run the copyright update script.Nick Mathewson
2016-09-09Fix a coupole of coverity complaints.Nick Mathewson
2016-09-08Fix remaining test warnings. (in test_relay.c)Nick Mathewson
2016-02-27Update the copyright year.Nick Mathewson
2015-02-23Remove lingering mempool codecypherpunks
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-22Fix a bunch of memory leaks in the unit tests. Found with valgrindNick Mathewson
2014-12-22Fix some coverity issues in the unit testsNick Mathewson
2014-09-30Update test_relay.c for recent test suite changes and --enable-mempools supportAndrea Shepard
2014-09-30Add append_cell_to_circuit_queue() unit testAndrea Shepard