aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_entrynodes.c
AgeCommit message (Collapse)Author
2021-07-12Add a switch to toggle the feature on/offGeorge Kadianakis
2021-07-06Code improvementsGeorge Kadianakis
2021-07-01Introduce vanguards-lite subsystem and some of its entry pointsGeorge Kadianakis
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-08-05Replace several C identifiers for ticket 18106.Nick Mathewson
We used to have a single boolean, "FascistFirewall". Ages ago, in tickets #17840 and #9067, we added an improved "ReachableAddresses" mechanism. It's time to rename related identifiers in the code for consistency. This closes #18106. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ fascist_firewall_allows_address reachable_addr_allows \ fascist_firewall_use_ipv6 reachable_addr_use_ipv6 \ fascist_firewall_prefer_ipv6_impl reachable_addr_prefer_ipv6_impl \ fascist_firewall_prefer_ipv6_orport reachable_addr_prefer_ipv6_orport \ fascist_firewall_prefer_ipv6_dirport reachable_addr_prefer_ipv6_dirport \ fascist_firewall_allows_address_addr reachable_addr_allows_addr \ fascist_firewall_allows_address_ap reachable_addr_allows_ap \ fascist_firewall_allows_base reachable_addr_allows_base \ fascist_firewall_allows_ri_impl reachable_addr_allows_ri_impl \ fascist_firewall_allows_rs_impl reachable_addr_allows_rs_impl \ fascist_firewall_allows_rs reachable_addr_allows_rs \ fascist_firewall_allows_md_impl reachable_addr_allows_md_impl \ fascist_firewall_allows_node reachable_addr_allows_node \ fascist_firewall_allows_dir_server reachable_addr_allows_dir_server \ fascist_firewall_choose_address_impl reachable_addr_choose_impl \ fascist_firewall_choose_address reachable_addr_choose \ fascist_firewall_choose_address_base reachable_addr_choose_base \ fascist_firewall_choose_address_rs reachable_addr_choose_from_rs \ fascist_firewall_choose_address_ls reachable_addr_choose_from_ls \ fascist_firewall_choose_address_node reachable_addr_choose_from_node \ fascist_firewall_choose_address_dir_server reachable_addr_choose_from_dir_server
2020-07-14addr: Use tor_addr_t instead of uint32_t for IPv4David Goulet
This changes a LOT of code but in the end, behavior is the same. Unfortunately, many functions had to be changed to accomodate but in majority of cases, to become simpler. Functions are also removed specifically those that were there to convert an IPv4 as a host format to a tor_addr_t. Those are not needed anymore. The IPv4 address field has been standardized to "ipv4_addr", the ORPort to "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport". This is related to Sponsor 55 work that adds IPv6 support for relays and this work is needed in order to have a common interface between IPv4 and IPv6. Closes #40043. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-11Fix and update unittests.George Kadianakis
Co-authored-by: Florentin Rochet <florentin.rochet@uclouvain.be>
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-10-26Rename confparse.[ch] identifiers to confmgt.[ch] identifiers.Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ confparse.h confmgt.h \ confparse.c confmgt.c \ CONFPARSE_PRIVATE CONFMGT_PRIVATE \ TOR_CONFPARSE_H TOR_CONFMGT_H
2019-10-22Re-run make autostyle.Nick Mathewson
2019-10-22Merge branch 'ticket31705_v2' into ticket31705_v2_mergedNick Mathewson
Conflicts: src/feature/dirparse/authcert_parse.c src/feature/dirparse/ns_parse.c src/feature/hs/hs_service.c src/lib/conf/conftesting.h src/lib/log/log.h src/lib/thread/threads.h src/test/test_options.c These conflicts were mostly related to autostyle improvements, with one or two due to doxygen fixes.
2019-10-22test: Hide some test-declaration macro definitions to COCCI.Nick Mathewson
(These ones cause parsing failures.)
2019-09-12Merge branch 'tor-github/pr/1319'David Goulet
2019-09-12Merge remote-tracking branch 'tor-github/pr/1300'Nick Mathewson
2019-09-11Update #includes to point to confparse.h in its new location.Nick Mathewson
This commit was automatically generated by running scripts/maint/rectify_include_paths.py .
2019-09-06entrynodes: Make routine descriptor expiry notice logs less alarmingteor
When tor is missing descriptors for some primary entry guards, make the log message less alarming. It's normal for descriptors to expire, as long as tor fetches new ones soon after. Fixes bug 31657; bugfix on 0.3.3.1-alpha.
2019-08-28Refactor config free logic to use a single path.Nick Mathewson
The right way to free a config object is now to wrap config_free(), always. Instead of creating an alternative free function, objects should provide an alternative clear callback to free any fields that the configuration manager doesn't manage. This lets us simplify our code a little, and lets us extend the confparse.c code to manage additional fields in config_free.
2019-04-26Use a linear algorithm to subtract two nodelists.Nick Mathewson
The nodelist_idx for each node_t serves as a unique identifier for the node, so we can use a bitarray to hold all the excluded nodes, and then remove them from the smartlist. Previously use used smartlist_subtract(sl, excluded), which is O(len(sl)*len(excluded)). We can use this function in other places too, but this is the one that showed up on the profiles of 30291. Closes ticket 30307.
2019-04-26Make nodelist_get_list() return a const pointer.Nick Mathewson
2019-02-14Merge branch 'tor-github/pr/536' into maint-0.3.5George Kadianakis
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2019-01-09Merge branch 'bug28591_035_squashed'Nick Mathewson
2018-12-01Merge remote-tracking branch 'tor-github/pr/536'Nick Mathewson
2018-12-01Merge branch 'maint-0.3.4' into maint-0.3.5Nick Mathewson
2018-12-01Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-11-29Dir: when Tor's clock is behind, use a future consensus to bootstrapteor
When Tor's clock is behind the clocks on the authorities, allow Tor to bootstrap successfully. Fixes bug 28591; bugfix on 0.2.0.9-alpha.
2018-11-22Entry Nodes: Test on reasonably live consensusesteor
As well as live consensuses. Tests for 24661.
2018-11-22Entry Nodes: refactor tests to use macrosteor
Part of 24661.
2018-11-22Test: make unit tests use a reasonably live consensusteor
Cleanup after 24661.
2018-11-22Test: Fix memory leaks and missing unmocks in entry guard teststeor
test_entry_guard_outdated_dirserver_exclusion leaks memory, and is missing some unmocks. Fixes 28554; bugfix on 0.3.0.1-alpha.
2018-10-01Remove routerparse include from files that dont use itNick Mathewson
2018-10-01Move routerparse and parsecommon to their own module.Nick Mathewson
2018-09-21Split directory.c code into several modulesNick Mathewson
Parts of this C file naturally belong in dircache, dirclient, and dircommon: so, move them there.
2018-07-09Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-07-09Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-07-09Merge branch 'maint-0.3.4'Nick Mathewson
2018-07-09Merge remote-tracking branch 'github/bug26269_031' into maint-0.3.2Nick Mathewson
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-05Remove util.hNick Mathewson
Inline its contents (which were all includes) into or.h, and some of its contents into other places that didn't include or.h at all.
2018-07-01Extract or_state_t to its own header.Nick Mathewson
Fewer modules needed this than I had expected.
2018-07-01Remove needless includes from or.hNick Mathewson
or.h should really include only the minimum of stuff from or/*, common/*, and lib/*.
2018-06-22Remove bloom filters, order statistics, and bitarrays from container.hNick Mathewson
2018-06-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Extract routerinfo_t into its own header.Nick Mathewson
I was expecting this to be much worse.
2018-06-15Extract microdesc_t into its own header.Nick Mathewson
2018-06-15Extract routerstatus_t into its own header.Nick Mathewson
2018-06-15Extract networkstatus_t and ..sr_info_t into their own headersNick Mathewson