summaryrefslogtreecommitdiff
path: root/src/or/router.c
AgeCommit message (Collapse)Author
2017-07-13rephist: Remove unused crypto_pk statistics.Isis Lovecruft
These statistics were largely ununsed, and kept track of statistical information on things like how many time we had done TLS or how many signatures we had verified. This information is largely not useful, and would only be logged after receiving a SIGUSR1 signal (but only if the logging severity level was less than LOG_INFO). * FIXES #19871. * REMOVES note_crypto_pk_op(), dump_pk_op(), and pk_op_counts from src/or/rephist.c. * REMOVES every external call to these functions.
2017-06-21Call it a BUG to use -1 in authdir_mode_handles_descsNick Mathewson
2017-06-21Remove obsolete authdir_mode_any_nonhidserv()huyvq
- Replace it with authdir_mode()
2017-06-21Convert authdir_mode_handles_descs() to alternative wrappershuyvq
-authdir_mode_handles_descs(options, ROUTER_PURPOSE_BRIDGE) to authdir_mode_bridge(options). - authdir_mode_handles_descs(options, ROUTER_PURPOSE_GENERAL) to authdir_mode_v3(options).
2017-06-21Convert authdir_mode_handles_descs(options, -1) with authdir_mode(options)huyvq
2017-06-21Remove obsolete authdir_mode_any_main()huyvq
2017-06-05Merge branch 'maint-0.3.0'Nick Mathewson
2017-05-31Bugfix: Regenerate more certificates when appropriateNick Mathewson
Previously we could sometimes change our signing key, but not regenerate the certificates (signing->link and signing->auth) that were signed with it. Also, we would regularly replace our TLS x.509 link certificate (by rotating our TLS context) but not replace our signing->link ed25519 certificate. In both cases, the resulting inconsistency would make other relays reject our link handshakes. Fixes two cases of bug 22460; bugfix on 0.3.0.1-alpha.
2017-05-24get rid of some dead code (leftover from commit fa04fe1)Roger Dingledine
2017-05-24add copy of MyFamily element to the descriptor, not the element itselfRoger Dingledine
If we add the element itself, we will later free it when we free the descriptor, and the next time we go to look at MyFamily, things will go badly. Fixes the rest of bug 22368; bugfix on 0.3.1.1-alpha.
2017-05-24don't free the values in options->MyFamily when we make a descriptorRoger Dingledine
If we free them here, we will still attempt to access the freed memory later on, and also we will double-free when we are freeing the config. Fixes part of bug 22368.
2017-05-10Merge remote-tracking branch 'public/my-family-list-fix-4498'Nick Mathewson
2017-05-09Merge branch 'dgoulet_ticket22060_031_01_squashed'Nick Mathewson
2017-05-09config: Remove {Control,DNS,Dir,Socks,Trans,NATD,OR}ListenAddress optionDavid Goulet
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans up the code associated with it. Partially fixes #22060 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-05-09config: Remove TLSECGroup optionDavid Goulet
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans up the code associated with it. Partially fixes #22060 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-05-09config: Remove AllowSingleHopExits optionDavid Goulet
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans up the code associated with it. Partially fixes #22060 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-05-08Merge branch 'netflow_padding-v6-rebased2-squashed'Nick Mathewson
2017-05-08Netflow record collapsing defense.Mike Perry
This defense will cause Cisco, Juniper, Fortinet, and other routers operating in the default configuration to collapse netflow records that would normally be split due to the 15 second flow idle timeout. Collapsing these records should greatly reduce the utility of default netflow data for correlation attacks, since all client-side records should become 30 minute chunks of total bytes sent/received, rather than creating multiple separate records for every webpage load/ssh command interaction/XMPP chat/whatever else happens to be inactive for more than 15 seconds. The defense adds consensus parameters to govern the range of timeout values for sending padding packets, as well as for keeping connections open. The defense only sends padding when connections are otherwise inactive, and it does not pad connections used solely for directory traffic at all. By default it also doesn't pad inter-relay connections. Statistics on the total padding in the last 24 hours are exported to the extra-info descriptors.
2017-04-21Replace remaining directory_initiate_command_* instancesNick Mathewson
2017-04-14MyFamily config string is now a list. #4998Daniel Pinto
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
2017-01-17relay: Honor DataDirectoryGroupReadable at key initDavid Goulet
Our config code is checking correctly at DataDirectoryGroupReadable but then when we initialize the keys, we ignored that option ending up at setting back the DataDirectory to 0700 instead of 0750. Patch by "redfish". Fixes #19953 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-12-12Replace "people" with the appropriate network component in commentsJ. Ryan Stinnett
Fixes #18145.
2016-12-08Merge branch 'feature15056_v1_squashed'Nick Mathewson
2016-11-21Merge branch 'maint-0.2.9'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-11-10Add an ed25519 identity to extend_infoNick Mathewson
2016-11-08Merge branch 'maint-0.2.9'Nick Mathewson
2016-10-31policy_is_reject_star():Nick Mathewson
ome policies are default-reject, some default-accept. But policy_is_reject_star() assumed they were all default_reject. Fix that! Also, document that policy_is_reject_star() treats a NULL policy as empty. This allows us to simplify the checks in parse_reachable_addresses() by quite a bit. Fxes bug 20306; bugfix on 0.2.8.2-alpha.
2016-10-27Automated change to use smartlist_add_strdupovercaffeinated
Use the following coccinelle script to change uses of smartlist_add(sl, tor_strdup(str)) to smartlist_add_strdup(sl, string) (coccinelle script from nickm via bug 20048): @@ expression a; expression b; @@ - smartlist_add + smartlist_add_strdup (a, - tor_strdup( b - ) )
2016-10-18Module-level docs for ext_orport and router.cNick Mathewson
2016-10-13Tweak patch for 18529.Nick Mathewson
- function doesn't need to be inline. - rename function - Make documentation more pedantically correct - Remove needless "? 1 : 0."
2016-10-13Remove duplicate code that checks for default authoritiesNick Mathewson
Patch from ericho. Fixes 18529. Simple refactoring.
2016-09-28Fix memory leak from prop264 branch. CID 1373401Nick Mathewson
2016-09-26Merge branch 'protover_v2_squashed'Nick Mathewson
2016-09-26Rename get_supported_protocols to protover_get_supported_protocolsNick Mathewson
2016-09-26Emit and parse protocol lists in router descriptorsNick Mathewson
2016-09-06Give useful error if authority_signing_key doesn't existSebastian Hahn
2016-08-29Merge remote-tracking branch 'teor/reject-tap-v6'Nick Mathewson
2016-08-23Use tor_assert, not assert.Nick Mathewson
2016-08-23Merge branch 'bug13953_squashed'Nick Mathewson
2016-08-23Reword the router_check_descriptor_address_port_consistency log messageteor
The new message covers static and dynamic public IPv4 addresses, and external / internal addresses in NAT setups.
2016-08-16Check parameters to router_check_descriptor_address_port_consistencyteor
2016-08-16Refactor duplicate code in router_check_descriptor_address_consistencyteor
No behaviour change
2016-08-15Make log message clearers7r
Longer and more explicit log message so we don't confuse users with behind NAT with working configurations and state that public IP addresses only should be provided with "Address", won't work with internal addresses.
2016-08-02Get the extend_info_from_router check the right way aroundteor