aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_config.c
AgeCommit message (Collapse)Author
2017-03-15Run the copyright update script.Nick Mathewson
2017-01-27client: set IPv6Traffic to on by defaultDaniel Kahn Gillmor
See: https://trac.torproject.org/projects/tor/ticket/21269 https://bugs.debian.org/851798 Closes #21269 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-01-03Fix unit test failures in response to DNS hijacking.Nick Mathewson
Some DNS NXDOMAIN hijackers hijack truly ridiculous domains, like "invalid-stuff!!" or "1.2.3.4.5". This would provoke unit test failures where we used addresses like that to force tor_addr_lookup() to fail. The fix, for testing, is to mock tor_addr_lookup() with a variant that always fails when it gets a name with a !. Fixes bugs 20862 and 20863.
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-12whitespace fixNick Mathewson
2016-12-06Accept non-space whitespace characters in log severity syntax.J. Ryan Stinnett
Adds a test_config_parse_log_severity unit test to verify behavior. Fixes #19965.
2016-11-30Split bridge functions into a new module.Nick Mathewson
This patch is just: * Code movement * Adding headers here and there as needed * Adding a bridges_free_all() with a call to it. It breaks compilation, since the bridge code needed to make exactly 2 calls into entrynodes.c internals. I'll fix those in the next commit.
2016-11-16refactor router_pick_published_address to have another argRoger Dingledine
no change in behavior except fewer log entries in the case where we use a cached result.
2016-10-14Whitespace cleaningNick Mathewson
2016-10-04Allow a unix: address to contain a C-style quoted string.Nick Mathewson
Feature 18753 -- all this to allow spaces.
2016-09-08Placate "make check-spaces"Nick Mathewson
2016-09-08Unit test fix: windows should be able to handle DNSPort just fine.Nick Mathewson
2016-09-07Merge remote-tracking branch 'dgoulet/ticket18693_029_01'Nick Mathewson
2016-09-05Fix BUG warning with stack trace from config/parse_port_config__listenaddressNick Mathewson
2016-08-24Make port names and types consistent in the port unit teststeor (Tim Wilson-Brown)
String constant changes only, and only in the unit tests. These strings are used in log messages only.
2016-08-24Parse *Port flags NoDNSRequest, NoOnionTraffic & OnionTrafficOnlyteor (Tim Wilson-Brown)
OnionTrafficOnly is equivalent to NoDNSRequest, NoIPv4Traffic, and NoIPv6Traffic. Add unit tests for parsing and checking option validity. Add documentation for each flag to the man page. Add changes file for all of #18693. Parsing only: the flags do not change client behaviour (yet!)
2016-07-05Repair unit test that assumed we have 9 dirauths.Nick Mathewson
2016-03-01First RelaxDirModeCheck implementationPeter Palfrader
2016-02-27Update the copyright year.Nick Mathewson
2016-02-24Fix a huge number of leaks in test_config.cNick Mathewson
I no longer see asan reporting memory leaks in the unit tests.
2016-02-22Small fixup on last fix to test leaksNick Mathewson
2016-02-22Fix a bunch of memory leaks in the unit testsNick Mathewson
2016-02-01Redux: don't expect unix sockets to be accepted on windowsNick Mathewson
2016-02-01Don't expect unix sockets to be accepted on WindowsNick Mathewson
Fixes failures in test_config.c; bug not in any released tor.
2016-01-21Merge remote-tracking branch 'twstrike/parse_port_config_tests'Nick Mathewson
2016-01-06Add FallbackDir list to GETINFO config/defaultsGeorge Tankersley
2015-12-18Fix config/directory_fetch after 12538 mergeNick Mathewson
2015-12-17Prop210: Fix directory fetch teststeor (Tim Wilson-Brown)
Check that directory fetches behave as expected under Prop 210.
2015-12-15Merge remote-tracking branch 'teor/feature15775-fallback-v9-squashed'Nick Mathewson
2015-12-16Add Fallback Directory Candidate Selection Scriptteor
"Tor has included a feature to fetch the initial consensus from nodes other than the authorities for a while now. We just haven't shipped a list of alternate locations for clients to go to yet. Reasons why we might want to ship tor with a list of additional places where clients can find the consensus is that it makes authority reachability and BW less important. We want them to have been around and using their current key, address, and port for a while now (120 days), and have been running, a guard, and a v2 directory mirror for most of that time." Features: * whitelist and blacklist for an opt-in/opt-out trial. * excludes BadExits, tor versions that aren't recommended, and low consensus weight directory mirrors. * reduces the weighting of Exits to avoid overloading them. * places limits on the weight of any one fallback. * includes an IPv6 address and orport for each FallbackDir, as implemented in #17327. (Tor won't bootstrap using IPv6 fallbacks until #17840 is merged.) * generated output includes timestamps & Onionoo URL for traceability. * unit test ensures that we successfully load all included default fallback directories. Closes ticket #15775. Patch by "teor". OnionOO script by "weasel", "teor", "gsathya", and "karsten".
2015-12-15Merge remote-tracking branch 'teor/feature17327-v4'Nick Mathewson
2015-12-15Merge remote-tracking branch 'teor/feature4483-v10-squashed'Nick Mathewson
2015-12-16Prop210: Close excess connections once a consensus is downloadingteor (Tim Wilson-Brown)
Once tor is downloading a usable consensus, any other connection attempts are not needed. Choose a connection to keep, favouring: * fallback directories over authorities, * connections initiated earlier over later connections Close all other connections downloading a consensus.
2015-12-15Add UseDefaultFallbackDirs for hard-coded directory mirrorsteor (Tim Wilson-Brown)
UseDefaultFallbackDirs enables any hard-coded fallback directory mirrors. Default is 1, set it to 0 to disable fallbacks. Implements ticket 17576. Patch by "teor".
2015-12-14Authorities on IPv6: minor fixes and unit teststeor (Tim Wilson-Brown)
Update the code for IPv6 authorities and fallbacks for function argument changes. Update unit tests affected by the function argument changes in the patch. Add unit tests for authority and fallback: * adding via a function * line parsing * adding default authorities (Adding default fallbacks is unit tested in #15775.)
2015-10-05Divide the different parse_port_config groups into separate testsOla Bini
2015-10-05Use tor_addr_eq instead of tt_mem_opOla Bini
2015-10-05Move CL_PORT definitions so they are accessible to the tests as wellOla Bini
2015-10-05Fix all spacesOla Bini
2015-09-15Add tests for parse_port_configOla Bini
2015-04-23Unit tests for consider_adding_dir_servers() as modified in #15642teor
Unit tests for the 10 valid combinations of set/NULL config options DirAuthorities, AlternateBridgeAuthority, AlternateDirAuthority, and FallbackDir. Add assertion in consider_adding_dir_servers() for checks in validate_dir_servers(): "You cannot set both DirAuthority and Alternate*Authority."
2015-02-23Fix endianness issues in test_config_resolve_my_address().rl1987
Since resolve_my_address() yields IP address in host order there is no need to use byteorder functions for conversion.
2015-01-23Try to fix some more memory leaks in the unit testsNick Mathewson
2015-01-13Allow MapAddress and Automap to work togetherNick Mathewson
The trick here is to apply mapaddress first, and only then apply automapping. Otherwise, the automap checks don't get done. Fix for bug 7555; bugfix on all versions of Tor supporting both MapAddress and AutoMap.
2015-01-07appease "make check-spaces"Nick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-29Merge branch 'resolvemyaddr_squashed'Nick Mathewson
2014-12-29Make the resolvemyaddr unit tests pass when local dns is hijackedNick Mathewson
If you are in a coffee shop that returns a helpful redirect page for "onionrouter", or on an ISP that does the same, the test as written would fail.
2014-12-29Fix memory leaks in resolvemyaddr testsNick Mathewson
2014-12-29Fix compilation errors in resolvemyaddr testsNick Mathewson