summaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2017-03-16Use "STATIC" to export consdiff fns for testingNick Mathewson
Previously test_consdiff.c just did #include "consdiff.c", which is not great style, and messes up coverage testing.
2017-03-16Consensus diff backend from Daniel Martí GSOC project.Daniel Martí
(This commit was extracted by nickm based on the final outcome of the project, taking only the changes in the files touched by this commit from the consdiff_rebased branch. The directory-system changes are going to get worked on separately.)
2017-03-07Merge branch 'maint-0.3.0'Nick Mathewson
2017-03-07Merge branch 'bug21594_030_squashed' into maint-0.3.0Nick Mathewson
2017-03-07Remove delay in hidden service introduction point checksteor
Make hidden services with 8 to 10 introduction points check for failed circuits immediately after startup. Previously, they would wait for 5 minutes before performing their first checks. Fixes bug 21594; bugfix on commit 190aac0eab9 in Tor 0.2.3.9-alpha. Reported by alecmuffett.
2017-03-06Merge remote-tracking branch 'ahf/bugs/20988'Nick Mathewson
2017-03-06Fix a function name in a comment. Closes 21580Nick Mathewson
2017-03-04Merge branch 'feature21598_squashed'Nick Mathewson
2017-03-04Log a message when a hidden service has fewer intro points than expectedteor
Closes ticket 21598.
2017-03-04Merge branch 'bug21599_squashed'Nick Mathewson
2017-03-04Simplify hidden service descriptor creationteor
Use an existing flag to check if an introduction point is established. Cleanup after 21596. Fixes bug 21599; bugfix on 0.2.7.2-alpha.
2017-03-04Merge remote-tracking branch 'teor/bug21596_030'Nick Mathewson
2017-03-04Merge branch 'maint-0.3.0'Nick Mathewson
2017-03-04Merge remote-tracking branch 'teor/bug21576_029_v2' into maint-0.3.0Nick Mathewson
2017-03-02Make hidden services always check for failed intro point connectionsteor
Previously, they would stop checking when they exceeded their intro point creation limit. Fixes bug 21596; bugfix on commit d67bf8b2f23 in Tor 0.2.7.2-alpha. Reported by alecmuffett.
2017-03-02Make hidden services always check for failed intro point connectionsteor
Previously, they would stop checking when they exceeded their intro point creation limit. Fixes bug 21596; bugfix on commit d67bf8b2f23 in Tor 0.2.7.2-alpha. Reported by alecmuffett.
2017-03-02Fix a crash when a connection tries to open just after it has been unlinkedteor
Fixes bug 21576; bugfix on Tor 0.2.9.3-alpha. Reported by alecmuffett.
2017-03-01Use tor_fgets() instead of fgets().Alexander Færøy
This patch changes our use of fgets() to tor_fgets() for more consistent error handling across different versions of the C library.
2017-03-01Merge branch 'maint-0.3.0'Nick Mathewson
2017-03-01Restore correct behavior of 0.3.0.4-rc with bridges+ipv6-minNick Mathewson
In that chutney test, the bridge client is configured to connect to the same bridge at 127.0.0.1:5003 _and_ at [::1]:5003, with no change in transports. That meant, I think, that the descriptor is only assigned to the first bridge when it arrives, and never the second.
2017-03-01Merge remote-tracking branch 'asn/bug21586'Nick Mathewson
2017-03-01Prevent SRV assert when called from misconfigured bridge auth.George Kadianakis
2017-03-01Merge branch 'maint-0.3.0'Nick Mathewson
2017-03-01Improve descriptor checks in the new guard algorithm.George Kadianakis
- Make sure we check at least two guards for descriptor before making circuits. We typically use the first primary guard for circuits, but it can also happen that we use the second primary guard (e.g. if we pick our first primary guard as an exit), so we should make sure we have descriptors for both of them. - Remove BUG() from the guard_has_descriptor() check since we now know that this can happen in rare but legitimate situations as well, and we should just move to the next guard in that case.
2017-02-28Merge remote-tracking branch 'teor/bug21507-029'Nick Mathewson
2017-02-28Merge remote-tracking branch 'public/bug21407'Nick Mathewson
2017-02-28Merge branch 'maint-0.3.0'Nick Mathewson
2017-02-28Merge remote-tracking branch 'public/bug21007_case2_030' into maint-0.3.0Nick Mathewson
2017-02-28Merge branch 'maint-0.3.0'Nick Mathewson
2017-02-28Merge branch 'bug21027_v2_squashed' into maint-0.3.0Nick Mathewson
2017-02-28Change approach to preventing duplicate guards.Nick Mathewson
Previously I'd made a bad assumption in the implementation of prop271 in 0.3.0.1-alpha: I'd assumed that there couldn't be two guards with the same identity. That's true for non-bridges, but in the bridge case, we allow two bridges to have the same ID if they have different addr:port combinations -- in order to have the same bridge ID running multiple PTs. Fortunately, this assumption wasn't deeply ingrained: we stop enforcing the "one guard per ID" rule in the bridge case, and instead enforce "one guard per <id,addr,port>". We also needed to tweak our implementation of get_bridge_info_for_guard, since it made the same incorrect assumption. Fixes bug 21027; bugfix on 0.3.0.1-alpha.
2017-02-27Merge branch 'disable_memory_sentinels_squashed'Nick Mathewson
2017-02-27Code to disable memory sentinels for fuzzingNick Mathewson
This feature makes it possible to turn off memory sentinels (like those used for safety in buffers.c and memarea.c) when fuzzing, so that we can catch bugs that they would otherwise prevent.
2017-02-27Merge branch 'maint-0.3.0'Nick Mathewson
2017-02-27Merge branch 'bug21369_check_029_squashed' into maint-0.3.0Nick Mathewson
2017-02-27Merge branch 'maint-0.3.0'Nick Mathewson
2017-02-27Merge remote-tracking branch 'teor/bug20711' into maint-0.3.0Nick Mathewson
2017-02-27Fix a wide lineNick Mathewson
2017-02-27Fix a "directive within macro arguments" warningNick Mathewson
2017-02-27Merge remote-tracking branch 'ahf/bugs/21206'Nick Mathewson
2017-02-27Add one other BUG check to try to fix/solve 21369.Nick Mathewson
Teor thinks that this connection_dirserv_add_dir_bytes_to_outbuf() might be the problem, if the "remaining" calculation underflows. So I'm adding a couple of checks there, and improving the casts.
2017-02-27Try to check for (and prevent) buffer size INT_MAX overflow better.Nick Mathewson
Possible fix or diagnostic for 21369.
2017-02-24Merge branch 'maint-0.3.0'Nick Mathewson
2017-02-24Whitespace fix.Nick Mathewson
2017-02-24Merge branch 'maint-0.3.0'Nick Mathewson
2017-02-24hs: Fix bad use of sizeof() when encoding ESTABLISH_INTRO legacy cellDavid Goulet
When encoding a legacy ESTABLISH_INTRO cell, we were using the sizeof() on a pointer instead of using the real size of the destination buffer leading to an overflow passing an enormous value to the signing digest function. Fortunately, that value was only used to make sure the destination buffer length was big enough for the key size and in this case it always was because of the overflow. Fixes #21553 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-02-24Also allow C_MEASURE_TIMEOUT circuits to lack guard state.Nick Mathewson
Fixes a case of 21007; bugfix on 0.3.0.1-alpha when prop271 was implemented. Found by toralf.
2017-02-19Reject Tor versions that contain non-numeric prefixesteor
strto* and _atoi64 accept +, -, and various whitespace before numeric characters. And permitted whitespace is different between POSIX and Windows. Fixes bug 21507 and part of 21508; bugfix on 0.0.8pre1.
2017-02-17Merge branch 'maint-0.3.0'Nick Mathewson
2017-02-17Remove a redundant check in ..transition_affects_guards()Nick Mathewson
scan-build found that we we checking UseEntryGuards twice. Fixes bug 21492.