aboutsummaryrefslogtreecommitdiff
path: root/src/or/addressmap.c
AgeCommit message (Collapse)Author
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.
2018-07-03Merge remote-tracking branch 'github/ticket26626'Nick Mathewson
2018-07-03Use the standard SHRT_MAX name.Nick Mathewson
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-21Rectify include paths (automated)Nick Mathewson
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-15Split entry and edge_connection_t into their own headers.Nick Mathewson
2018-05-08Merge branch 'ticket25993_squashed'Nick Mathewson
2018-05-01Mark bug cases of addressmap_get_virtual_address as non-coveredNick Mathewson
2018-04-06refactor: Alphabetise some includes in /src/or/*.Isis Lovecruft
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* ADD new /src/common/crypto_rand.[ch] module. * ADD new /src/common/crypto_util.[ch] module (contains the memwipe() function, since all crypto_* modules need this). * FIXES part of #24658: https://bugs.torproject.org/24658
2017-12-08Convert remaining function (mostly static) to new free styleNick Mathewson
2017-10-31trivial comment fixesRoger Dingledine
done while i was trying to debug nearby code
2017-09-15Replace accumulated C ;;s with ;sNick Mathewson
I don't know where these came from.
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-08-22Refactor node lookup APIs to take flagsNick Mathewson
Right now there's a single warn_if_unnamed flag for router_get_consensus_status_by_nickname() and node_get_by_nickname(), that is nearly always 1. I've turned it into an 'unsigned' bitfield, and inverted its sense. I've added the flags argument to node_get_by_hex_id() too, though it does nothing there right now. I've removed the router_get_consensus_status_by_nickname() function, since it was only used in once place. This patch changes the warning behavior of GETINFO ns/name/<name>, since all other name lookups from the controller currently warn. Later I'm going to add more flags, for ed25519 support.
2017-03-15Run the copyright update script.Nick Mathewson
2016-10-27Comment the heck out of the stream/circuit attaching process.Nick Mathewson
2016-10-03Fix parse_virtual_addr_network minimum network sizePaolo Inglese
2016-07-28Fix a huge pile of -Wshadow warnings.Nick Mathewson
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
2016-02-27Update the copyright year.Nick Mathewson
2016-02-27Make sure that every module in src/or has a brief description.Nick Mathewson
2015-01-19Merge branch 'bug7555_v2_squashed'Nick Mathewson
Conflicts: src/or/connection_edge.c
2015-01-16Merge branch 'bug8546_squashed'Nick Mathewson
Conflicts: src/or/connection.c src/or/or.h src/or/relay.c
2015-01-16Move entry_port_cfg_t fields in entry_connection_tNick Mathewson
Also rename some options for uniformity, and apply this script: @@ entry_connection_t *conn; @@ conn-> +entry_cfg. \( isolation_flags \| session_group \| socks_prefer_no_auth \| ipv4_traffic \| ipv6_traffic \| prefer_ipv6 \| cache_ipv4_answers \| cache_ipv6_answers \| use_cached_ipv4_answers \| use_cached_ipv6_answers \| prefer_ipv6_virtaddr \)
2015-01-14Merge remote-tracking branch 'origin/maint-0.2.5'Nick 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-13Remove needless strdup in addressmap_register_virtual_address()Nick Mathewson
Fixes bug 14195. Bugfix on 0.1.0.1-rc.
2015-01-13More unit tests for rewriting entry connection addressesNick Mathewson
2015-01-13Actually set *expires_out in addressmap_rewrite.Nick Mathewson
Fixes 14193; bugfix on 35d08e30d, which went into 0.2.3.17-beta.
2015-01-11Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2015-01-11Don't crash on torrc Vi[rtualAddrNetworkIPv[4|6]] with no option valueteor
Check for a missing option value in parse_virtual_addr_network before asserting on the NULL in tor_addr_parse_mask_ports. This avoids crashing on torrc lines like Vi[rtualAddrNetworkIPv[4|6]] when no value follows the option. Bugfix on 0.2.3 (de4cc126cbb5 on 24 November 2012), fixes #14142.
2015-01-06Merge remote-tracking branch 'public/bug12509_025'Nick Mathewson
2015-01-06Merge remote-tracking branch 'tvdw/from-the-archive'Nick Mathewson
2015-01-06Whitespace fixTom van der Woerdt
2015-01-06Minor IPv6-related memory leak fixesTom van der Woerdt
2015-01-06Minor documentation fixesTom van der Woerdt
2015-01-04Prevent changes to other options from removing . from AutomapHostsSuffixesNick Mathewson
This happened because we changed AutomapHostsSuffixes to replace "." with "", since a suffix of "" means "match everything." But our option handling code for CSV options likes to remove empty entries when it re-parses stuff. Instead, let "." remain ".", and treat it specially when we're checking for a match. Fixes bug 12509; bugfix on 0.2.0.1-alpha.
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-23Merge remote-tracking branch 'public/bug13811_025'Nick Mathewson
2014-12-23Fix Matthews code to actually use tmpFrancisco Blas Izquierdo Riera (klondike)
Matthew's autoaddr code returned an undecorated address when trying to check that the code didn't insert an undecorated one into the map. This patch fixes this by actually storing the undecorated address in tmp instead of buf as it was originally intended. This patch is released under the same license as the original file as long as the author iscredited. Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-03-25Fix warnings from doxygenNick Mathewson
Most of these are simple. The only nontrivial part is that our pattern for using ENUM_BF was confusing doxygen by making declarations that didn't look like declarations.
2013-07-10Completely refactor how FILENAME_PRIVATE worksNick Mathewson
We previously used FILENAME_PRIVATE identifiers mostly for identifiers exposed only to the unit tests... but also for identifiers exposed to the benchmarker, and sometimes for identifiers exposed to a similar module, and occasionally for no really good reason at all. Now, we use FILENAME_PRIVATE identifiers for identifiers shared by Tor and the unit tests. They should be defined static when we aren't building the unit test, and globally visible otherwise. (The STATIC macro will keep us honest here.) For identifiers used only by the unit tests and never by Tor at all, on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS. This is not the motivating use case for the split test/non-test build system; it's just a test example to see how it works, and to take a chance to clean up the code a little.
2013-04-03Controller: Add CACHED keyword to ADDRMAP events (#8596 part 2/2)Desoxy
Add keyword CACHED="YES"/"NO" to ADDRMAP control events to indicate whether the DNS response will be cached or not.
2013-01-16Merge branch '024_msvc_squashed'Nick Mathewson
Conflicts: src/or/or.h srcwin32/orconfig.h
2013-01-16When building with MSVC, call every enum bitfield unsignedNick Mathewson
Fixes bug 7305.
2013-01-16Update the copyright date to 201.Nick Mathewson
2012-12-17Drop the maximum attempts to get a virtual address to 1000.Nick Mathewson
This is good enough to give P_success >= 999,999,999/1,000,000,000 so long as the address space is less than 97.95 full. It'd be ridiculous for that to happen for IPv6, and usome reasonable assumptions, it would also be pretty silly for IPv4.