aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.h
AgeCommit message (Collapse)Author
2018-07-01Minimize headers that include crypto_formats and x25519 stuffNick Mathewson
2018-06-21Rectify include paths (automated).Nick Mathewson
You have no idea how glad I am that this is automated.
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-05-14Merge remote-tracking branch 'rl1987/bug25852_take2'Nick Mathewson
2018-05-10Tweak error handling for #25852rl1987
2018-05-10Avoid confusion with errno from libcrl1987
2018-05-10Make _with_err return routerinfo, like old function doesrl1987
2018-05-09Add a new net_is_completely_disabled() functionNick Mathewson
2018-05-05Improve GETCONF exit-policy/* error handlingrl1987
This will yield different error codes for transient and permament errors. Furthermore, Tor will give human readable error messages to controller.
2018-05-02dirauth: Move authdir_mode_v3() to moduleDavid Goulet
This function must return false if the module is not compiled in. In order to do that, we move the authdir_mode_v3() function out of router.c and into the dirauth module new header file named mode.h. It is always returning false if we don't have the module. Closes #25990 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-03-06Refactor: suppress duplicated functions from router.c and encapsulate ↵Caio Valente
NODE_DESC_BUF_LEN constant. Also encapsulates format_node_description(). Closes ticket 25432.
2018-01-24Clarify directory and ORPort checking functions.Fernando Fernandez Mancera
In order to make the OR and dir checking functions in router.c less confusing we renamed some functions and splitted consider_testing_reachability() into router_should_check_reachability() and router_do_reachability_checks(). Also we improved the documentation. Fixes #18918. Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
2017-12-08Replace all FREE_AND_NULL* uses to take a type and a free function.Nick Mathewson
This commit was made mechanically by this perl script: \#!/usr/bin/perl -w -i -p next if /^#define FREE_AND_NULL/; s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/; s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08Switch to a safer FREE_AND_NULL implementationNick Mathewson
This one only evaluates the input once, so it cannot mess up even if there are side effects.
2017-12-08Change the free macro convention in the rest of src/or/*.hNick Mathewson
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-06-21Remove obsolete authdir_mode_any_nonhidserv()huyvq
- Replace it with authdir_mode()
2017-06-21Remove obsolete authdir_mode_any_main()huyvq
2017-03-17Merge branch 'ahf_bugs_21641_squashed'Nick Mathewson
2017-03-17Add periodic timer for expiring old onion keys.Alexander Færøy
This patch adds a new timer that is executed when it is time to expire our current set of old onion keys. Because of proposal #274 this can no longer be assumed to be at the same time we rotate our onion keys since they will be updated less frequently. See: https://bugs.torproject.org/21641
2017-03-17Add API to query the current onion key grace period.Alexander Færøy
This patch adds an API to get the current grace period, in days, defined as the consensus parameter "onion-key-grace-period-days". As per proposal #274 the values for "onion-key-grace-period-days" is a default value of 7 days, a minimum value of 1 day, and a maximum value defined by other consensus parameter "onion-key-rotation-days" also defined in days. See: https://bugs.torproject.org/21641
2017-03-17Make MIN_ONION_KEY_LIFETIME a consensus parameter defined value.Alexander Færøy
This patch turns `MIN_ONION_KEY_LIFETIME` into a new function `get_onion_key_lifetime()` which gets its value from a network consensus parameter named "onion-key-rotation-days". This allows us to tune the value at a later point in time with no code modifications. We also bump the default onion key lifetime from 7 to 28 days as per proposal #274. See: https://bugs.torproject.org/21641
2017-03-15Run the copyright update script.Nick Mathewson
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-05-16touchups and refactorings on bug 18616 branchRoger Dingledine
no behavior changes
2016-02-27Update the copyright year.Nick Mathewson
2015-12-18Merge branch 'feature12538_028_01_squashed'Nick Mathewson
2015-12-17Prop210: Fix directory fetch teststeor (Tim Wilson-Brown)
Check that directory fetches behave as expected under Prop 210.
2015-12-16A relay now advertises "tunnelled-dir-server" in its descriptorMatthew Finkel
When a relay does not have an open directory port but it has an orport configured and is accepting client connections then it can now service tunnelled directory requests, too. This was already true of relays with an dirport configured. We also conditionally stop advertising this functionality if the relay is nearing its bandwidth usage limit - same as how dirport advertisement is determined. Partial implementation of prop 237, ticket 12538
2015-10-24A second test case for dns_resolve_impl.rl1987
2015-09-15Add tests for directory_handle_command_getReinaldo de Souza Jr
2015-08-11Split the client-only parts of init_keys() into a separate functionNick Mathewson
This should simplify the callgraph a little more.
2015-05-28Merge branch '12498_ed25519_keys_v6'Nick Mathewson
Fixed numerous conflicts, and ported code to use new base64 api.
2015-05-28Sign extrainfo documents with ed25519Nick Mathewson
Extrainfo documents are now ed-signed just as are router descriptors, according to proposal 220. This patch also includes some more tests for successful/failing parsing, and fixes a crash bug in ed25519 descriptor parsing.
2015-05-28Implement proposal 228: cross-certification with onion keysNick Mathewson
Routers now use TAP and ntor onion keys to sign their identity keys, and put these signatures in their descriptors. That allows other parties to be confident that the onion keys are indeed controlled by the router that generated the descriptor.
2015-05-28Implement ed25519-signed descriptorsNick Mathewson
Now that we have ed25519 keys, we can sign descriptors with them and check those signatures as documented in proposal 220.
2015-02-15Refactor router_rebuild_descriptorSebastian Hahn
Allow building a router descriptor without storing it to global state. This is in preparation of a patch to export the created descriptors via the control port.
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-11Fix 13941: make calling log_new_relay_greeting() optional.meejah
Specifically, only if we're creating secret_id_key do we log the greeting (and then only if the key is actually created).
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-10-27Remove configure option to disable curve25519Sebastian Hahn
By now, support in the network is widespread and it's time to require more modern crypto on all Tor instances, whether they're clients or servers. By doing this early in 0.2.6, we can be sure that at some point all clients will have reasonable support.
2014-04-15Uplift status.c unit test coverage with new test cases and macros.dana koch
A new set of unit test cases are provided, as well as introducing an alternative paradigm and macros to support it. Primarily, each test case is given its own namespace, in order to isolate tests from each other. We do this by in the usual fashion, by appending module and submodule names to our symbols. New macros assist by reducing friction for this and other tasks, like overriding a function in the global namespace with one in the current namespace, or declaring integer variables to assist tracking how many times a mock has been called. A set of tests for a small-scale module has been included in this commit, in order to highlight how the paradigm can be used. This suite gives 100% coverage to status.c in test execution.
2014-04-08Merge branch 'bug7952_final'Nick Mathewson
Conflicts: src/test/include.am src/test/test.c
2014-04-08Making entire exit policy available to Tor controller.rl1987
2014-03-18Take out remaining V1 directory code.Karsten Loesing
2014-02-28Unit tests for test_routerkeys_write_fingerprintNick Mathewson
2014-02-15Remove a bunch of functions that were never called.Nick Mathewson
2014-02-06remove node_describe_by_id() functionQingping Hou
This function is not used anymore
2014-02-03Merge remote-tracking branch 'houqp/hs_control'Nick Mathewson