summaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2015-11-27Check magic number in connection_ap_attach_pendingNick Mathewson
2015-11-26improve log messages to try to track down #17659Nick Mathewson
2015-11-26Correctly free a smartlist in getinfo_helper_policiesteor (Tim Wilson-Brown)
2015-11-25Merge branch 'bug17686_v2_027'Nick Mathewson
2015-11-25Now that crypto_rand() cannot fail, it should return void.Nick Mathewson
2015-11-25Make crypto_seed_rng() and crypto_rand() less scary.Nick Mathewson
These functions must really never fail; so have crypto_rand() assert that it's working okay, and have crypto_seed_rng() demand that callers check its return value. Also have crypto_seed_rng() check RAND_status() before returning.
2015-11-25fixup! Add controller getinfo exit-policy/reject-privateteor (Tim Wilson-Brown)
Stop ignoring ExitPolicyRejectPrivate in getinfo exit-policy/reject-private. Fix a memory leak. Set ExitPolicyRejectPrivate in the unit tests, and make a mock function declaration static.
2015-11-25Merge branch 'bug17654_try1'Nick Mathewson
2015-11-25Merge remote-tracking branch 'public/decouple_dir_request_failed'Nick Mathewson
2015-11-25Fix a logic error in connection_tls_continue_handshake().Nick Mathewson
(If we take the branch above this assertion, than we *didn't* have a v1 handshake. So if we don't take the branch, we did. So if we reach this assertion, we must be running as a server, since clients no longer attempt v1 handshakes.) Fix for bug 17654; bugfix on 9d019a7db725dca3dfdbf8d4dbc3b51835e0b49e. Bug not in any released Tor.
2015-11-25Merge remote-tracking branch 'teor/comments-20151123'Nick Mathewson
2015-11-25Merge remote-tracking branch 'teor/feature8961-replaycache-sha256'Nick Mathewson
2015-11-25Merge branch 'maint-0.2.7'Nick Mathewson
2015-11-24Use SHA256 in the replaycache, rather than SHA1teor (Tim Wilson-Brown)
This migrates away from SHA1, and provides further hash flooding protection on top of the randomised siphash implementation. Add unit tests to make sure that different inputs don't have the same hash.
2015-11-23Fix: use the right list in find_expiring_intro_point()David Goulet
The wrong list was used when looking up expired intro points in a rend service object causing what we think could be reachability issues and triggering a BUG log. Fixes #16702 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-11-23fix two typos in commentsRoger Dingledine
2015-11-20fix "make check-spaces"Nick Mathewson
2015-11-20Fix compilation warningsNick Mathewson
2015-11-20Merge branch 'getinfo-private-exitpolicy-v4-squashed'Nick Mathewson
2015-11-20Add controller getinfo exit-policy/reject-privateteor (Tim Wilson-Brown)
exit-policy/reject-private lists the reject rules added by ExitPolicyRejectPrivate. This makes it easier for stem to display exit policies. Add unit tests for getinfo exit-policy/*. Completes ticket #17183. Patch by "teor".
2015-11-20Refactor router_dump_exit_policy_to_stringteor (Tim Wilson-Brown)
Split out policy_dump_to_string to use it in getinfo_helper_policies.
2015-11-20Block OutboundBindAddressIPv[4|6]_ and configured ports on exit relaysteor (Tim Wilson-Brown)
Modify policies_parse_exit_policy_reject_private so it also blocks the addresses configured for OutboundBindAddressIPv4_ and OutboundBindAddressIPv6_, and any publicly routable port addresses on exit relays. Add and update unit tests for these functions.
2015-11-20Refactor policies_parse_exit_policy_internalteor (Tim Wilson-Brown)
Move the code that rejects publicly routable exit relay addresses to policies_parse_exit_policy_reject_private. Add addr_policy_append_reject_addr_list and use it to reject interface addresses. This removes the duplicate reject checks on local_address and ipv6_local_address, but duplicates will be removed by exit_policy_remove_redundancies at the end of the function. This also removes the info-level logging on rejected interface addresses. Instead, log a debug-level message in addr_policy_append_reject_addr. This simplifies policies_parse_exit_policy_internal and prepares for reporting these addresses over the control port in #17183.
2015-11-19Merge remote-tracking branch 'public/decouple_conn_attach_2'Nick Mathewson
2015-11-18Fix a startup time assert caused by periodic events not being initialized.Yawning Angel
Loading a on disk bridge descriptor causes a directory download to be scheduled, which asserts due to the periodic events not being initialized yet. Fixes bug #17635, not in any released version of tor.
2015-11-17windows already has a CALLBACK macro...Nick Mathewson
2015-11-17Don't relaunch dir requests recursively if connection_connect() returns -1Nick Mathewson
Closes ticket 17589.
2015-11-17Fix a server-side crash on DNS initNick Mathewson
2015-11-17Some unit tests now require that periodic events be initialized.Nick Mathewson
2015-11-17Free pending_entry_connections on shutdown.Nick Mathewson
2015-11-17Be more conservative in scanning the list of pending streamsNick Mathewson
Now we only re-scan the list in the cases we did before: when we have a new circuit that we should try attaching to, or when we have added a new stream that we haven't tried to attach yet. This is part of 17590.
2015-11-17Decouple ..attach_circuit() from most of its callers.Nick Mathewson
Long ago we used to call connection_ap_handshake_attach_circuit() only in a few places, since connection_ap_attach_pending() attaches all the pending connections, and does so regularly. But this turned out to have a performance problem: it would introduce a delay to launching or connecting a stream. We couldn't just call connection_ap_attach_pending() every time we make a new connection, since it walks the whole connection list. So we started calling connection_ap_attach_pending all over, instead! But that's kind of ugly and messes up our callgraph. So instead, we now have connection_ap_attach_pending() use a list only of the pending connections, so we can call it much more frequently. We have a separate function to scan the whole connection array to see if we missed adding anything, and log a warning if so. Closes ticket #17590
2015-11-17Whoops; in this context the EV_TIMEOUT flag is neededNick Mathewson
2015-11-17Merge branch 'bug3199_redux_3'Nick Mathewson
2015-11-17Changes to 3199 branch based on feedback from specialNick Mathewson
2015-11-16Add documentation for periodic event apiNick Mathewson
2015-11-16Add a missing "if" in the comment on warn_nonlocal_controller_portsteor (Tim Wilson-Brown)
Also reflow all the lines of that comment so that they're under the maximum width.
2015-11-16Add missing " in AccountingMax comment in or.hteor (Tim Wilson-Brown)
2015-11-13Change periodic.c to use libevent directlyNick Mathewson
Libevent's periodic timers aren't the right solution when the timeout potentially changes every time.
2015-11-13fix whitespace; remove dead codeNick Mathewson
2015-11-13Fold all of the run-every-second stuff back into run_scheduled_events()Nick Mathewson
2015-11-13Turn all of run_scheduled_events() into a bunch of periodic eventsNick Mathewson
This patch is designed to look good when you see it through 'diff -b': it mostly leaves entries in the same order, and leaves the code unmodified.
2015-11-13Connect periodic events to mainNick Mathewson
2015-11-13Infrastructure for replacing global periodic events in main.cKevin Butler
(This is from Kevin's bug3199 patch series; nick extracted it into a new file and changed the interface a little, then did some API tweaks on it.)
2015-11-13appease check-spacesNick Mathewson
2015-11-13Merge remote-tracking branch 'public/ticket11150_client_only'Nick Mathewson
2015-11-12Merge branch 'decouple_circuit_mark_squashed'Nick Mathewson
2015-11-12Experimentally decouple the main body of circuit_mark_for_closeNick Mathewson
2015-11-12Merge branch 'karsten_bug13192_026_03_teor'Nick Mathewson
2015-11-10Mark fallback directoriess as too busy after a 503 responseteor (Tim Wilson-Brown)
Mark fallback directory mirrors as "too busy" when they return a 503 response. Previously, the code just marked authorities as busy. Unless clients set their own fallback directories, they will never see this bug. (There are no default fallbacks yet.) Fixes bug 17572; bugfix on 5c51b3f1f0d4 released in 0.2.4.7-alpha. Patch by "teor".