]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
10 years agoRestore semantics of advertise vs serve on directory cacheing
Nick Mathewson [Wed, 11 Nov 2015 18:34:05 +0000 (13:34 -0500)] 
Restore semantics of advertise vs serve on directory cacheing

When we are low on accounted bandwidth, we stop advertising that
we're a directory, but we will continue to answer directory
requests, just as before.

10 years agoChange dataflow on generating 'dir-cache' flag.
Nick Mathewson [Tue, 3 Nov 2015 14:29:31 +0000 (09:29 -0500)] 
Change dataflow on generating 'dir-cache' flag.

Convention is that router_dump_router_to_string() should look at its
input "router", which should be generated by
router_build_fresh_descirptor().

10 years agoAssert rs are added in con and con_md tests
Matthew Finkel [Wed, 27 May 2015 16:37:10 +0000 (16:37 +0000)] 
Assert rs are added in con and con_md tests

10 years agoAutomatically generate md-con method vers in test
Matthew Finkel [Wed, 27 May 2015 08:29:34 +0000 (08:29 +0000)] 
Automatically generate md-con method vers in test

10 years agoLet make_consensus_method_list be used in tests
Matthew Finkel [Wed, 27 May 2015 08:28:33 +0000 (08:28 +0000)] 
Let make_consensus_method_list be used in tests

10 years agoA router must be a dir cache before it may be HSDir
Matthew Finkel [Mon, 25 May 2015 23:09:33 +0000 (23:09 +0000)] 
A router must be a dir cache before it may be HSDir

Fixes #15801

10 years ago{dis,en}abling DirCache is a semantic change
Matthew Finkel [Mon, 25 May 2015 22:18:31 +0000 (22:18 +0000)] 
{dis,en}abling DirCache is a semantic change

10 years agoRebuild descriptor when DirCache is {dis,en}abled
Matthew Finkel [Mon, 25 May 2015 21:24:26 +0000 (21:24 +0000)] 
Rebuild descriptor when DirCache is {dis,en}abled

10 years agoAdd new DirCache configuration option
Matthew Finkel [Sun, 8 Feb 2015 06:51:51 +0000 (06:51 +0000)] 
Add new DirCache configuration option

This will give relay operators the ability of disabling the caching of
directory data. In general, this should not be necessary, but on some
lower-resource systems it may beneficial.

10 years agoAdd unit test for router_pick_directory_server_impl
Matthew Finkel [Mon, 26 Jan 2015 19:49:48 +0000 (19:49 +0000)] 
Add unit test for router_pick_directory_server_impl

10 years agoClient should check if dir server has open dir port or handles tunnelled requests
Matthew Finkel [Wed, 29 Oct 2014 00:29:48 +0000 (00:29 +0000)] 
Client should check if dir server has open dir port or handles tunnelled requests

Final piece of prop 237. Closes 12538.

10 years agoA relay now advertises "tunnelled-dir-server" in its descriptor
Matthew Finkel [Tue, 28 Oct 2014 22:01:06 +0000 (22:01 +0000)] 
A relay now advertises "tunnelled-dir-server" in its descriptor

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

10 years agoAuthorities must set a router's V2Dir flag if it supports tunnelled reqs
Matthew Finkel [Tue, 28 Oct 2014 17:12:52 +0000 (17:12 +0000)] 
Authorities must set a router's V2Dir flag if it supports tunnelled reqs

Partial implementation of prop 237, ticket 12538

10 years agoMerge branch 'maint-0.2.7'
Nick Mathewson [Wed, 16 Dec 2015 14:24:40 +0000 (09:24 -0500)] 
Merge branch 'maint-0.2.7'

10 years agoDon't call pthread_condattr_setclock() unless it exists
Nick Mathewson [Wed, 16 Dec 2015 14:23:44 +0000 (09:23 -0500)] 
Don't call pthread_condattr_setclock() unless it exists

Fixes bug 17819; bugfix on 0.2.6.3-alpha (specifically, d684dbb0).

10 years agoMerge branch 'maint-0.2.7'
Nick Mathewson [Wed, 16 Dec 2015 14:07:11 +0000 (09:07 -0500)] 
Merge branch 'maint-0.2.7'

10 years ago... and fix another backtrace_symbols_fd call in sandbox.c
Nick Mathewson [Wed, 16 Dec 2015 14:05:49 +0000 (09:05 -0500)] 
... and fix another backtrace_symbols_fd call in sandbox.c

10 years ago... and fix the linux backtrace_symbols{,_fd} calls
Nick Mathewson [Wed, 16 Dec 2015 13:20:53 +0000 (08:20 -0500)] 
... and fix the linux backtrace_symbols{,_fd} calls

10 years agotweak router_parse_addr_policy_item_from_string docs
Nick Mathewson [Wed, 16 Dec 2015 13:49:32 +0000 (08:49 -0500)] 
tweak router_parse_addr_policy_item_from_string docs

10 years agoMerge remote-tracking branch 'teor/feature17863'
Nick Mathewson [Wed, 16 Dec 2015 13:48:28 +0000 (08:48 -0500)] 
Merge remote-tracking branch 'teor/feature17863'

10 years agoMerge remote-tracking branch 'teor/feature17864'
Nick Mathewson [Wed, 16 Dec 2015 13:41:20 +0000 (08:41 -0500)] 
Merge remote-tracking branch 'teor/feature17864'

10 years agoMore debugging code to try to track down #17659
Nick Mathewson [Wed, 16 Dec 2015 13:37:40 +0000 (08:37 -0500)] 
More debugging code to try to track down #17659

10 years agoAdd some assertions to try to catch #17752
Nick Mathewson [Wed, 16 Dec 2015 13:24:54 +0000 (08:24 -0500)] 
Add some assertions to try to catch #17752

10 years ago... and fix the linux backtrace_symbols{,_fd} calls
Nick Mathewson [Wed, 16 Dec 2015 13:20:53 +0000 (08:20 -0500)] 
... and fix the linux backtrace_symbols{,_fd} calls

10 years agoWait for busy authorities/fallbacks rather than ignoring excluded nodes
teor (Tim Wilson-Brown) [Mon, 14 Dec 2015 09:20:52 +0000 (20:20 +1100)] 
Wait for busy authorities/fallbacks rather than ignoring excluded nodes

Applies the 6c443e987d fix to router_pick_directory_server_impl.

6c443e987d applied to directory servers chosen from the consensus,
and was:
"Tweak the 9969 fix a little

If we have busy nodes and excluded nodes, then don't retry with the
excluded ones enabled. Instead, wait for the busy ones to be nonbusy."

10 years agoWarn when comparing against an AF_UNSPEC address in a policy
teor (Tim Wilson-Brown) [Tue, 15 Dec 2015 21:47:47 +0000 (08:47 +1100)] 
Warn when comparing against an AF_UNSPEC address in a policy

It produces unexpected results, and it's most likely a bug.

10 years agoAdd policy assume_action support for IPv6 addresses
teor (Tim Wilson-Brown) [Tue, 15 Dec 2015 21:49:06 +0000 (08:49 +1100)] 
Add policy assume_action support for IPv6 addresses

These IPv6 addresses must be quoted, because : is the port separator,
and "acce" is a valid hex block.

Add unit tests for assumed actions in IPv6 policies.

10 years agoInitialise malformed_list to 0 each time we parse a policy
teor (Tim Wilson-Brown) [Tue, 15 Dec 2015 21:50:13 +0000 (08:50 +1100)] 
Initialise malformed_list to 0 each time we parse a policy

10 years agoLimit IPv6 mask bits to 128
teor (Tim Wilson-Brown) [Tue, 15 Dec 2015 21:48:32 +0000 (08:48 +1100)] 
Limit IPv6 mask bits to 128

10 years agoMerge remote-tracking branch 'teor/feature15775-fallback-v9-squashed'
Nick Mathewson [Tue, 15 Dec 2015 19:04:00 +0000 (14:04 -0500)] 
Merge remote-tracking branch 'teor/feature15775-fallback-v9-squashed'

10 years agoFix some memory leaks in the unit tests
Nick Mathewson [Tue, 15 Dec 2015 19:00:08 +0000 (14:00 -0500)] 
Fix some memory leaks in the unit tests

10 years agoAdd Fallback Directory Candidate Selection Script
teor [Tue, 12 May 2015 18:10:39 +0000 (04:10 +1000)] 
Add Fallback Directory Candidate Selection Script

"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".

10 years agoclean whitespace
Nick Mathewson [Tue, 15 Dec 2015 18:22:41 +0000 (13:22 -0500)] 
clean whitespace

10 years agoMerge remote-tracking branch 'teor/feature17327-v4'
Nick Mathewson [Tue, 15 Dec 2015 18:19:18 +0000 (13:19 -0500)] 
Merge remote-tracking branch 'teor/feature17327-v4'

10 years agoremove redundant section in tor.1.txt
Nick Mathewson [Tue, 15 Dec 2015 18:18:06 +0000 (13:18 -0500)] 
remove redundant section in tor.1.txt

10 years agoMerge branch 'feature8195_small_squashed'
Nick Mathewson [Tue, 15 Dec 2015 18:11:06 +0000 (13:11 -0500)] 
Merge branch 'feature8195_small_squashed'

10 years agoUpdate KeepCapabilities based on comments from asn
Nick Mathewson [Thu, 26 Nov 2015 16:03:35 +0000 (11:03 -0500)] 
Update KeepCapabilities based on comments from asn

* The option is now KeepBindCapabilities
* We now warn if the user specifically asked for KeepBindCapabilities
  and we can't deliver.
* The unit tests are willing to start.
* Fewer unused-variable warnings.
* More documentation, fewer misspellings.

10 years agoAdd unit tests for switch_id(), including tests for capabilities
Nick Mathewson [Fri, 6 Nov 2015 20:35:15 +0000 (15:35 -0500)] 
Add unit tests for switch_id(), including tests for capabilities

10 years agoAdd ability to keep the CAP_NET_BIND_SERVICE capability on Linux
Nick Mathewson [Fri, 6 Nov 2015 18:12:44 +0000 (13:12 -0500)] 
Add ability to keep the CAP_NET_BIND_SERVICE capability on Linux

This feature allows us to bind low ports when starting as root and
switching UIDs.

Based on code by David Goulet.

Implement feature 8195

10 years agoFix a few compilation warnings and errors
Nick Mathewson [Tue, 15 Dec 2015 18:03:21 +0000 (13:03 -0500)] 
Fix a few compilation warnings and errors

10 years agoMerge remote-tracking branch 'teor/feature4483-v10-squashed'
Nick Mathewson [Tue, 15 Dec 2015 17:57:57 +0000 (12:57 -0500)] 
Merge remote-tracking branch 'teor/feature4483-v10-squashed'

10 years agoProp210: Add router_digest_is_fallback_dir
teor (Tim Wilson-Brown) [Thu, 10 Dec 2015 18:49:23 +0000 (05:49 +1100)] 
Prop210: Add router_digest_is_fallback_dir

router_digest_is_fallback_dir returns 1 if the digest is in the
currently loaded list of fallback directories, and 0 otherwise.

This function is for future use.

10 years agoProp210: Close excess connections once a consensus is downloading
teor (Tim Wilson-Brown) [Mon, 7 Dec 2015 07:07:44 +0000 (18:07 +1100)] 
Prop210: Close excess connections once a consensus is downloading

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.

10 years agoProp210: Add schedules for simultaneous client consensus downloads
teor (Tim Wilson-Brown) [Mon, 7 Dec 2015 06:55:38 +0000 (17:55 +1100)] 
Prop210: Add schedules for simultaneous client consensus downloads

Prop210: Add attempt-based connection schedules

Existing tor schedules increment the schedule position on failure,
then retry the connection after the scheduled time.

To make multiple simultaneous connections, we need to increment the
schedule position when making each attempt, then retry a (potentially
simultaneous) connection after the scheduled time.

(Also change find_dl_schedule_and_len to find_dl_schedule, as it no
longer takes or returns len.)

Prop210: Add multiple simultaneous consensus downloads for clients

Make connections on TestingClientBootstrapConsensus*DownloadSchedule,
incrementing the schedule each time the client attempts to connect.

Check if the number of downloads is less than
TestingClientBootstrapConsensusMaxInProgressTries before trying any
more connections.

10 years agoMerge branch 'feature17576-UseDefaultFallbackDirs-v2-squashed'
Nick Mathewson [Tue, 15 Dec 2015 17:19:08 +0000 (12:19 -0500)] 
Merge branch 'feature17576-UseDefaultFallbackDirs-v2-squashed'

10 years agoAdd UseDefaultFallbackDirs for hard-coded directory mirrors
teor (Tim Wilson-Brown) [Tue, 24 Nov 2015 21:53:29 +0000 (08:53 +1100)] 
Add UseDefaultFallbackDirs for hard-coded directory mirrors

UseDefaultFallbackDirs enables any hard-coded fallback
directory mirrors. Default is 1, set it to 0 to disable fallbacks.

Implements ticket 17576.
Patch by "teor".

10 years agoProp210: Add want_authority to directory_get_from_dirserver
teor (Tim Wilson-Brown) [Mon, 7 Dec 2015 06:47:10 +0000 (17:47 +1100)] 
Prop210: Add want_authority to directory_get_from_dirserver

10 years agoProp210: Refactor connection_get_* to produce lists and counts
teor (Tim Wilson-Brown) [Mon, 7 Dec 2015 06:40:56 +0000 (17:40 +1100)] 
Prop210: Refactor connection_get_* to produce lists and counts

10 years agoMerge branch 'maint-0.2.7'
Nick Mathewson [Tue, 15 Dec 2015 16:55:46 +0000 (11:55 -0500)] 
Merge branch 'maint-0.2.7'

10 years agoFix backtrace compilation on FreeBSD
cypherpunks [Tue, 15 Dec 2015 15:30:04 +0000 (16:30 +0100)] 
Fix backtrace compilation on FreeBSD

On FreeBSD backtrace(3) uses size_t instead of int (as glibc does). This
causes integer precision loss errors when we used int to store its
results.

The issue is fixed by using size_t to store the results of backtrace(3).

The manual page of glibc does not mention that backtrace(3) returns
negative values. Therefore, no unsigned integer wrapping occurs when its
result is stored in an unsigned data type.

10 years agoAdd changes file for 17804
cypherpunks [Thu, 10 Dec 2015 16:00:49 +0000 (17:00 +0100)] 
Add changes file for 17804

10 years agoRemove the INLINE coding standard
cypherpunks [Thu, 10 Dec 2015 15:54:52 +0000 (16:54 +0100)] 
Remove the INLINE coding standard

10 years agoRemove eventdns specific inline definition
cypherpunks [Thu, 10 Dec 2015 15:47:39 +0000 (16:47 +0100)] 
Remove eventdns specific inline definition

The header includes compat.h which already defines inline.

10 years agoRemove obsolete INLINE preprocessor definition
cypherpunks [Thu, 10 Dec 2015 15:26:04 +0000 (16:26 +0100)] 
Remove obsolete INLINE preprocessor definition

The INLINE keyword is not used anymore in favor of inline.

Windows only supports __inline so an inline preprocessor definition is
still needed.

10 years agoReplace usage of INLINE with inline
cypherpunks [Thu, 10 Dec 2015 15:19:43 +0000 (16:19 +0100)] 
Replace usage of INLINE with inline

This patch was generated using;

  sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]

10 years agoMerge branch 'maint-0.2.7'
Nick Mathewson [Mon, 14 Dec 2015 20:45:54 +0000 (15:45 -0500)] 
Merge branch 'maint-0.2.7'

10 years agoUse TESTS_ENVIRONMENT for older Automake versions
cypherpunks [Mon, 14 Dec 2015 20:03:10 +0000 (21:03 +0100)] 
Use TESTS_ENVIRONMENT for older Automake versions

The AM_TESTS_ENVIRONMENT variable is available since Automake v1.12 but
some distributions have older Automake versions so we use
TESTS_ENVIRONMENT.

10 years agoMerge branch 'maint-0.2.7'
Nick Mathewson [Mon, 14 Dec 2015 18:21:16 +0000 (13:21 -0500)] 
Merge branch 'maint-0.2.7'

10 years agoAdd changes file for 17818
cypherpunks [Fri, 11 Dec 2015 23:06:41 +0000 (00:06 +0100)] 
Add changes file for 17818

10 years agoUse variables instead of substitutions
cypherpunks [Fri, 11 Dec 2015 22:51:17 +0000 (23:51 +0100)] 
Use variables instead of substitutions

Using variables removes the ambiguity about when to use variables and
when to use substitutions. Variables always work. Substitutions only
work when Autoconf knows about them which is not always the case.

The variables are also placed between quotes to ensures spaces in the
variables are handled properly.

10 years agoOnly setup environment variables for tests
cypherpunks [Fri, 25 Sep 2015 14:39:11 +0000 (16:39 +0200)] 
Only setup environment variables for tests

Using the AM_TESTS_ENVIRONMENT variable ensures the environment
variables are only set during test execution and not during the
compilation phase.

10 years agoAdd IPv6 addresses & orports to the default directory authorities
teor (Tim Wilson-Brown) [Fri, 11 Dec 2015 09:40:45 +0000 (20:40 +1100)] 
Add IPv6 addresses & orports to the default directory authorities

Source: Globe entries for each authority.

10 years agoAuthorities on IPv6: minor fixes and unit tests
teor (Tim Wilson-Brown) [Fri, 11 Dec 2015 11:14:46 +0000 (22:14 +1100)] 
Authorities on IPv6: minor fixes and unit tests

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.)

10 years agoAdd a new ipv6=address:orport flag to DirAuthority and FallbackDir
Nick Mathewson [Fri, 22 Feb 2013 21:10:40 +0000 (16:10 -0500)] 
Add a new ipv6=address:orport flag to DirAuthority and FallbackDir

Resolves # 6027

10 years agoFix a pair of dead assignments
Nick Mathewson [Fri, 11 Dec 2015 14:35:43 +0000 (09:35 -0500)] 
Fix a pair of dead assignments

10 years agoWhitespace fix
Nick Mathewson [Fri, 11 Dec 2015 01:04:04 +0000 (20:04 -0500)] 
Whitespace fix

10 years agoFix wide line; log why chmod failed.
Nick Mathewson [Fri, 11 Dec 2015 01:03:37 +0000 (20:03 -0500)] 
Fix wide line; log why chmod failed.

10 years agoSimplify cpd_opts usage.
Nick Mathewson [Fri, 11 Dec 2015 01:02:22 +0000 (20:02 -0500)] 
Simplify cpd_opts usage.

10 years agoDefer creation of Unix socket until after setuid
Jamie Nguyen [Fri, 13 Nov 2015 13:57:11 +0000 (13:57 +0000)] 
Defer creation of Unix socket until after setuid

10 years agoIntroduce DataDirectoryGroupReadable boolean
Jamie Nguyen [Fri, 13 Nov 2015 14:18:26 +0000 (14:18 +0000)] 
Introduce DataDirectoryGroupReadable boolean

10 years agoPermit filesystem group to be root
Jamie Nguyen [Fri, 13 Nov 2015 14:17:02 +0000 (14:17 +0000)] 
Permit filesystem group to be root

10 years agoRefactor clock skew warning code to avoid duplication
Arlo Breault [Tue, 8 Dec 2015 19:32:29 +0000 (11:32 -0800)] 
Refactor clock skew warning code to avoid duplication

10 years agoMerge branch 'maint-0.2.7'
Nick Mathewson [Thu, 10 Dec 2015 19:25:14 +0000 (14:25 -0500)] 
Merge branch 'maint-0.2.7'

10 years agobump to 0.2.7.6-dev
Nick Mathewson [Thu, 10 Dec 2015 19:24:55 +0000 (14:24 -0500)] 
bump to 0.2.7.6-dev

10 years agoforward-port changelog and releasenotes
Nick Mathewson [Thu, 10 Dec 2015 19:24:22 +0000 (14:24 -0500)] 
forward-port changelog and releasenotes

10 years agomake stack-protector happy
Nick Mathewson [Thu, 10 Dec 2015 16:50:02 +0000 (11:50 -0500)] 
make stack-protector happy

10 years agoMerge branch 'maint-0.2.7'
Nick Mathewson [Thu, 10 Dec 2015 15:05:29 +0000 (10:05 -0500)] 
Merge branch 'maint-0.2.7'

10 years agobump maint version to 0.2.7.6
Nick Mathewson [Thu, 10 Dec 2015 15:04:59 +0000 (10:04 -0500)] 
bump maint version to 0.2.7.6

10 years agoRemove already-merged changes files.
Nick Mathewson [Thu, 10 Dec 2015 15:00:56 +0000 (10:00 -0500)] 
Remove already-merged changes files.

10 years agoadd a static
Nick Mathewson [Thu, 10 Dec 2015 14:43:55 +0000 (09:43 -0500)] 
add a static

10 years agoimprove a comment in memwipe
Nick Mathewson [Thu, 10 Dec 2015 14:03:47 +0000 (09:03 -0500)] 
improve a comment in memwipe

10 years agoMerge remote-tracking branch 'public/feature17694_strongest_027'
Nick Mathewson [Thu, 10 Dec 2015 14:02:10 +0000 (09:02 -0500)] 
Merge remote-tracking branch 'public/feature17694_strongest_027'

10 years agoAssert when the TLS contexts fail to initialize
cypherpunks [Thu, 10 Dec 2015 12:55:21 +0000 (13:55 +0100)] 
Assert when the TLS contexts fail to initialize

10 years agoMerge remote-tracking branch 'teor/fix-exitpolicy-leak'
Nick Mathewson [Wed, 9 Dec 2015 21:25:17 +0000 (16:25 -0500)] 
Merge remote-tracking branch 'teor/fix-exitpolicy-leak'

10 years agoMark a couple more arguments as unused.
Nick Mathewson [Wed, 9 Dec 2015 16:58:32 +0000 (11:58 -0500)] 
Mark a couple more arguments as unused.

10 years agoTry to fix windows build more.
Nick Mathewson [Wed, 9 Dec 2015 13:59:01 +0000 (08:59 -0500)] 
Try to fix windows build more.

patch from rubiate on #16651

10 years agoAssert that memory held by rephist is freed
cypherpunks [Wed, 2 Dec 2015 09:11:32 +0000 (10:11 +0100)] 
Assert that memory held by rephist is freed

The internal memory allocation and history object counters of the
reputation code can be used to verify the correctness of (part of) the
code. Using these counters revealed an issue where the memory allocation
counter is not decreased when the bandwidth arrays are freed.

A new function ensures the memory allocation counter is decreased when a
bandwidth array is freed.

This commit also removes an unnecessary cast which was found while
working on the code.

10 years agoMerge branch 'refactor-effective-entry'
Nick Mathewson [Wed, 9 Dec 2015 16:05:41 +0000 (11:05 -0500)] 
Merge branch 'refactor-effective-entry'

10 years agoTweak policies_log_first_redundant_entry even more
Nick Mathewson [Wed, 9 Dec 2015 16:04:56 +0000 (11:04 -0500)] 
Tweak policies_log_first_redundant_entry even more

  * Use smartlist_foreach_begin/end instead of a plain for loop.
  * constify the pointers.

10 years agoTweak policies_log_first_redundant_entry more.
Nick Mathewson [Wed, 9 Dec 2015 16:02:10 +0000 (11:02 -0500)] 
Tweak policies_log_first_redundant_entry more.

   * Since the variable is no longer modified, it should be called
     'policy' instead of 'dest'.  ("Dest" is short for
     "destination".)
   * Fixed the space issue that dgoulet found on the ticket.
   * Fixed the comment a little. (We use the imperative for function
     documentation.)

10 years agoMerge remote-tracking branch 'teor/first-hop-no-private'
Nick Mathewson [Wed, 9 Dec 2015 15:47:59 +0000 (10:47 -0500)] 
Merge remote-tracking branch 'teor/first-hop-no-private'

10 years agochanges file for bug17791
Nick Mathewson [Wed, 9 Dec 2015 15:38:13 +0000 (10:38 -0500)] 
changes file for bug17791

10 years agoFix formatting typo in manpage.
Andrew Kvalheim [Wed, 9 Dec 2015 02:23:43 +0000 (18:23 -0800)] 
Fix formatting typo in manpage.

10 years agoMerge branch 'bug17776'
Nick Mathewson [Wed, 9 Dec 2015 15:31:14 +0000 (10:31 -0500)] 
Merge branch 'bug17776'

10 years agoAssert that the directory server digest is given
cypherpunks [Wed, 9 Dec 2015 12:12:45 +0000 (13:12 +0100)] 
Assert that the directory server digest is given

This prevents a possible crash when memory is copied from a pointer to
NULL.

10 years agoMention the expected length of the digests
cypherpunks [Wed, 9 Dec 2015 12:07:35 +0000 (13:07 +0100)] 
Mention the expected length of the digests

Some functions that use digest maps did not mention that the digests are
expected to have DIGEST_LEN bytes. This lead to buffer over-reads in the
past.

10 years agoAdd changes file for 17776
cypherpunks [Mon, 16 Nov 2015 14:12:44 +0000 (15:12 +0100)] 
Add changes file for 17776

10 years agoRemove unnecessary casting
cypherpunks [Wed, 11 Nov 2015 14:05:47 +0000 (15:05 +0100)] 
Remove unnecessary casting

10 years agoFix buffer over-reads in the rendcache tests
cypherpunks [Wed, 11 Nov 2015 13:47:35 +0000 (14:47 +0100)] 
Fix buffer over-reads in the rendcache tests

The hidden service descriptor cache (rendcache) tests use digest maps
which expect keys to have a length of DIGEST_LEN.

Because the tests use key strings with a length lower than DIGEST_LEN,
the internal copy operation reads outside the key strings which leads to
buffer over-reads.

The issue is resolved by using character arrays with a size of
DIGEST_LEN.

Patch on ade5005853c17b3ae5923c194680442e0f86db4d.

10 years agoFix buffer over-reads in the directory tests
cypherpunks [Wed, 11 Nov 2015 10:50:09 +0000 (11:50 +0100)] 
Fix buffer over-reads in the directory tests

The tests pass empty digest strings to the dir_server_new function which
copies it into a directory server structure. The copy operation expects
the digest strings to be DIGEST_LEN characters long.

Because the length of the empty digest strings are lower than
DIGEST_LEN, the copy operation reads outside the digest strings which
leads to buffer over-reads.

The issue is resolved by using character arrays with a size of
DIGEST_LEN.

Patch on 4ff08bb5811ddfe554e597d129ec48a774364480.