summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-06-24addr: Refactor is_local_addr() to support IPv6David Goulet
Series of changes: 1. Rename function to reflect the namespace of the file. 2. Use the new last resolved cache instead of the unused last_resolved_addr_v4 (which is also removed in this commit). 3. Make the entire code base use the new resolved_addr_is_local() function. You will notice that this function uses /24 to differentiate subnets where the rest of tor uses /16 (including documentation of EnforceDistinctSubnets). Ticket #40009 has been opened for that. But that the moment, the function keeps looking at /24. Part of #33233 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-24addr: Refactor last resolved address cache accessorsDavid Goulet
Series of things done in this commit: 1. Rename the functions to better reflect the namespace of the file. 2. Make both reset and get function to operate on the last_resolved_addrs cache that is per family. 3. Make the get function to take a tor_addr_t. 4. Change all callsite to use the new convention. Part of #33233 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-24addr: Make resolve_my_address_v4() use find_my_address()David Goulet
In order to transition smoothly, maek resolve_my_address_v4() call the new fancy find_my_address() with AF_INET. Next commits should remove the use of resolve_my_address_v4() accross the code to use find_my_address(). This commit is so the unit tests would be more easily fixed and port to the new find_my_address() internals. Part of #33233. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-24addr: New find_my_address() to support multiple address familiesDavid Goulet
resolve_my_address() was beyond repair in terms of refactoring. Way too complex and doing too many things. This commit implements find_my_address() which in theory does the same as resolve_my_address() but in a more clean, concise and modern way using the tor_addr_t interface and for multiple address family. The caller needs to pass the address family (IPv4 or IPv6) which this interface supports. For both, a last resolved cache is used as well. Implements #33233 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-23addr: Rename last_resolved_addr to be v4 specificDavid Goulet
Part of #33233 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-23addr: Rename resolve_my_address to be v4 specificDavid Goulet
Part of #33233 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-23config: Change Address to be a LINELISTDavid Goulet
With prop312, we want to support IPv4 and IPv6 thus multiple Address statement (up to 2) will be accepted. For this, "Address" option becomes a LINELIST so we can properly process the IPv4 or/and IPv6. Part of #33233 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-23Merge branch 'maint-0.4.4'David Goulet
2020-06-23Merge branch 'tor-github/pr/1937' into maint-0.4.4David Goulet
2020-06-22Merge branch 'pr_1930_squashed'Nick Mathewson
2020-06-22Add circuit_extend_add_ipv(4/6)_helper() testNeel Chauhan
2020-06-22Fill in missing IPv6 addresses in extend cellsNeel Chauhan
2020-06-22Merge branch 'maint-0.4.4'David Goulet
2020-06-22Consistently use 'address' in Invalid v3 address responses to ↵Miguel Jacq
ONION_CLIENT_AUTH commands
2020-06-17Update the list of recommended protocol versions to match >=0.3.5.Nick Mathewson
Since Tor 0.2.9 has been unsupported since January, 0.3.5 is the oldest supported version, and its features constitute the oldest recommended feature-set. This patch updates these recommendations: DirCache=2 Support for consensus diffs. New in 0.3.1.1-alpha. HSDir=2 Support for v3 onion service descriptors. New in 0.3.0.4-alpha. HSIntro=4 Support for Ed25519 intropoint authentication keys. New in 0.3.0-4-alpha. HSRend=2 Support for rendezvous cells longer than 20 bytes. New in 0.2.9.4-alpha. Link=5 Link padding and link padding negotiation. New in 0.3.3.2-alpha. LinkAuth=3 Ed25519 link authentication. New in 0.3.0.1-alpha.
2020-06-17Spelling fix: "RECCOMEND" => "RECOMMEND".Nick Mathewson
2020-06-16Bump to 0.4.4.1-alpha-devNick Mathewson
2020-06-15Bump to 0.4.4.1-alphaNick Mathewson
2020-06-15Remove AssumeReachable from TestingTorNetwork.Nick Mathewson
Closes ticket 34446.
2020-06-12core: Remove unused filesDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-11Merge branch 'maint-0.4.4'George Kadianakis
2020-06-11Fix and update unittests.George Kadianakis
Co-authored-by: Florentin Rochet <florentin.rochet@uclouvain.be>
2020-06-11Update functions that load and write the guard state file.George Kadianakis
Co-authored-by: Florentin Rochet <florentin.rochet@uclouvain.be>
2020-06-11Pick guards on the order they were sampled (prop310).George Kadianakis
Co-authored-by: Florentin Rochet <florentin.rochet@uclouvain.be>
2020-06-11Refactor some guard state file parsing code into functions.Florentin Rochet
Co-authored-by: Florentin Rochet <florentin.rochet@uclouvain.be>
2020-06-10Merge branch 'tor-github/pr/1925'George Kadianakis
2020-06-10Bug 30992: Update testsMike Perry
2020-06-10Bug 30992: Track a padding machine ctr to reduce race issues.Mike Perry
This tracking of the instantiation count should eliminate race conditions due to starting and stopping machines rapidly. Now, we should no longer obey STOP commands for previous machines.
2020-06-09Merge remote-tracking branch 'tor-github/pr/1888/head'Nick Mathewson
2020-06-09Bump version to 0.4.5.0-alpha-devtor-0.4.5.0-alpha-devNick Mathewson
2020-06-08Update Trunnel for new machine_ctr field.Mike Perry
This field area was memset to 0 in old versions, which the code treats as "match any machine instance", for backward compatibility without a protover bump.
2020-06-05Merge remote-tracking branch 'tor-github/pr/1902/head'Nick Mathewson
2020-06-05Fix some checks of tor_inet_ntoa() return valuerl1987
Also, fix a format string.
2020-06-04Merge remote-tracking branch 'tor-github/pr/1910/head'Nick Mathewson
2020-06-04config: Styling fix + use fmt_addr()c
Conform to C99 as suggested by nickm on #32888 and use fmt_addr() rather than tor_addr_to_str_dup()
2020-06-03config: Add interface address debug loggingc
Add logging for "the local network interface addresses" as requested by ticket #32888.
2020-06-02remove a period from a doxygen headingNick Mathewson
The other headings don't have periods.
2020-06-02Merge branch 'tor-github/pr/1909'George Kadianakis
2020-06-01config: Add IPv4 Address config debug loggingc
Per ticket #32888 this should address logging "the Address torrc option", "and whether it is an IP address, or a DNS name"; or the detected "local hostname", "and whether it is an IP address, or a DNS name". Some of these details already seem to be logged, so just add what's missing.
2020-05-30Preemptive circs should work with UseEntryGuards 0Roger Dingledine
Resume being willing to use preemptively-built circuits when UseEntryGuards is set to 0. We accidentally disabled this feature with that config setting (in our fix for #24469), leading to slower load times. Fixes bug 34303; bugfix on 0.3.3.2-alpha.
2020-05-28Merge branch 'tor-github/pr/1901'David Goulet
2020-05-27Merge branch 'tor-github/pr/1898'George Kadianakis
2020-05-27Add HS v3 status to the SIGUSR1 dumpstats()Neel Chauhan
2020-05-21Merge remote-tracking branch 'tor-github/pr/1899/head'Nick Mathewson
2020-05-21Merge branch 'tor-github/pr/1850'George Kadianakis
2020-05-21Merge branch 'tor-github/pr/1861'George Kadianakis
2020-05-21Tweak format stringrl1987
2020-05-21Check for NULL from tor_dup_ip()rl1987
2020-05-21Bail out of format_networkstatus_vote if fmt_addr32() failed.rl1987
Something is fishy if we cannot put IP address string into dir-vote line.
2020-05-21Actually, bail out of routerstatus_format_entry() if fmt_addr32() failsrl1987