aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
Commit message (Expand)AuthorAge
* Add GeoIP database for IPv6 addressesnils2012-10-17
* Fix comment on circuit_t.n_hop and remove circuitmux TODO in or.hAndrea Shepard2012-10-10
* Remove cell_ewma_t from or.h and from circuit_t/or_circuit_t; all that goes t...Andrea Shepard2012-10-10
* Handle n_mux/p_mux properly in circuitmux.cAndrea Shepard2012-10-10
* Implement circuitmux_attach_circuit() in circuitmux.cAndrea Shepard2012-10-10
* Use circuitmux_t in channels and when relaying cellsAndrea Shepard2012-10-10
* Add circuitmux.c, circuitmux.hAndrea Shepard2012-10-10
* Split channel_t into channel_t and channel_listener_t; get rid of that big unionAndrea Shepard2012-10-09
* Use channel_t rather than or_connection_t for circuitsAndrea Shepard2012-10-08
* Initial channeltls.c/channeltls.h for bug 6465Andrea Shepard2012-10-08
* Add channel.c/channel.h for bug 6465•••Note: this is a squashed commit; see branch bug6465_rebased_v2 of user/andrea/tor.git for full history of the following 90 commits: Add channel.c/channel.h for bug 6465 Fix make check-spaces in new channel.c/channel.h Make sure new channel.h is in nodist_HEADERS and Makefile.nmake is up to date too Add channel_state_t and state utility functions Add channel_change_state() Better comments in channel.h Add CHANNEL_STATE_LISTENING for channel_t Fix wide line in channel.c Add structures/prototypes for incoming cell handling Implement channel_queue_cell() and channel_queue_var_cell() Implement channel_process_cells() Fix asserts in channel_queue_cell() and channel_queue_var_cell() Add descriptive comments for channel_queue_cell() and channel_queue_var_cell() Implement channel cell handler getters/setters Queue outgoing writes when not in writeable state Drain queues and test assertions when changing channel_t state Add log_debug() messages for channel_t stuff Add log_debug() messages for channel_t stuff Add some channel_t metadata Add time_t client_used to channel_t Add channel_touched_by_client() Declare a few channel_t metadata queries we'll have to implement later for use by circuitbuild.c Add next_circ_id/circ_id_type to channel_t for use by circuitbuild.c Count n_circuits in channel_t Channel timestamp calls Add create timestamp for channel.h Declare some new metadata queries on channel_t Add get_real_remote_descr() prototype Move active_circuits stuff to channel_t, some other or.h and channel.h changes Make channel_t refcounted and use global lists of active channels Update channel_request_close() and channel_change_state() for channel_t registration mechanism Handle closing channels sensibly Add global_identifier for channels, channel_init() internal use function Add timestamp_last_added_nonpadding to channel_t Better comments in channel_init() Correctly handle next_circ_id in channel_init() Correctly handle next_circ_id in channel_init() and even compile this time Appease make check-spaces Update timestamps when writing cells to channel_t Add channel_flush_some_cells() to call channel_flush_from_first_active_circuit() Add registered channel lookup functions Get rid of client_used in or_connection_t; it's in channel_t now Get rid of circ_id_type in or_connection_t; implement channel_set_circ_id_type() Eliminate is_bad_for_new_circs in or_connection_t; implement getter/setter for it in channel_t Eliminate next_circ_id in or_connection_t in favor of channel_t Handle packed cells in channel_t for relay.c Add channel_identity_map and related functions Handle add/remove from channel identity map on state transitions Implement channel_is_local() and channel_mark_local() Implement channel_is_client() and channel_mark_client() Implement channel_is_outgoing() and channel_mark_outgoing() Eliminate declaration for redundant channel_nonopen_was_started_here() Add channel timestamps Add channel timestamps, fix some make-check-spaces complaints Remove redundant channel_was_started_here() function and initiated_remotely bit Rename channel_get_remote_descr()/channel_get_real_remote_descr() to something clearer in channel.h Replace channel_get_write_queue_len() with sufficient and easier to implement channel_has_queued_writes() in channel.h Change return type of channel_is_bad_for_new_circs() to int for consistency Implement channel_has_queued_writes() Rename channel_touched_by_client() and client_used field for consistency with other timestamps in channel.{c,h} Implement channel_get_actual_remote_descr() and channel_get_canonical_remote_descr() in channel.{c,h} Implement channel_matches_extend_info() in channel.{c,h} Implement channel_get_for_extend() and channel_is_better() in channel.{c,h} Make channel_is_better() public in channel.{c,h} Implement channel_matches_target_addr_for_extend() in channel.{c,h} Implement channel_is_canonical_is_reliable() in channel.{c,h} Demoronize get_remote_descr() method prototype - what the hell was I thinking there? Timestamp channels in the right places in channel.c Add missing tor_assert() in channel.c Check if the lower layer accepted a cell in channel_write_cell() et al. of channel.c Implement channel_flush_cells() in channel.c (w00t, it builds at last) Call channel_timestamp_drained() at the right places in channel.c Implement channel_run_cleanup() Support optional channel_get_remote_addr() method and use it for GeoIP in channel_do_open_actions() Get rid of channel refcounting; it'll be too complicated to handle it properly with all the pointers from circuits to channels, and closing from channel_run_cleanup() will work okay just like with connections Doxygenate channel.c Appease make check-spaces in channel.c Fix superfluous semicolons in channel.c Add/remove channels from identity digest map in all the right places in channel.c The cell queues on channel_t must be empty when going to a CLOSED or ERROR state Appease make check-spaces in channel.c Add channel_clear/set_identity_digest() and some better logging to channel.{c,h} Fix better logging to channel.c Avoid SIGSEGV testing for queue emptiness in channel_flush_some_cells_from_outgoing_queue() Remove TODO about checking cell queue in channel_free(); no need for it Appease make check-spaces in channel.c Add channel_free_all() and support functions Check nullness of active_circuit_pqueue in channel_free() Fix SMARTLIST_FOREACH_END usage in channel_process_cells() Rearrange channel_t struct to use a union distinguishing listener from cell-bearing channels in channel.{c,h} Andrea Shepard2012-10-08
* Merge remote-tracking branch 'linus/enh6876_2'Nick Mathewson2012-09-28
|\
| * Make option OutboundBindAddress accept IPv6 addresses too.•••Implements ticket 6786. Linus Nordberg2012-09-20
* | Remove the testing_since* fields•••They weren't actually used since 7a35dad00 Bug 5809 Nick Mathewson2012-09-21
|/
* Reject votes (not consensuses) with >64 known-flags•••Our flag voting code needs to handle unrecognized flags, so it stores them in a 64-bit bitfield. But we never actually checked for too many flags, so we were potentially doing stuff like U64_LITERAL(1)<<flagnum with flagnum >= 64. That's undefined behavior. Fix for bug 6833; bugfix on 0.2.0.1-alpha. Nick Mathewson2012-09-13
* Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-09-13
|\
| * Avoid undefined behaviour when parsing HS protocol versions•••Fixes bug 6827; bugfix on c58675ca728f12b42f65e5b8964ae695c2e0ec2d (when the v2 HS desc parser was implemented). Found by asn. Robert Ransom2012-09-13
* | Merge branch 'remove_old_ver_checks'Nick Mathewson2012-09-10
|\ \
| * | Remove version_supports checks for versions before 0.2.2.Nick Mathewson2012-09-07
* | | Rename _UseFilteringSSLBufferevents to lose its _. Bug 3155Nick Mathewson2012-09-10
|/ /
* | make AuthDirHasIPv6Connectivity match the man page•••we can turn it into an autobool later if we have some way for it to make a decision. (patch possibly got lost when nickm merged #6770; or maybe nickm meant for it to be this way. i'm not sure.) Roger Dingledine2012-09-05
* | Remove AuthDirPublishIPv6 and let AuthDirHasIPv6Connectivity fill its function.•••See #4771 for rationale. Note that this patch does not take suggested changes in #4470 into account and keeps treating AuthDirHasIPv6Connectivity as an AUTOBOOL. Thus, bug fixes for that are included here as well. This is a fix on master, unreleased as of now. Linus Nordberg2012-09-05
* | Add IPv6 OR port to microdesc_t and populate it.Linus Nordberg2012-09-04
* | Clients connect to public relays over IPv6.•••Add ClientUseIPv6 and ClientPreferIPv6ORPort configuration options. Use "preferred OR port" for all entry nodes, not only for bridges. Mark bridges with "prefer IPv6 OR port" if an IPv6 address is configured in Bridge line and ClientPreferIPv6ORPort is set. Mark relays with "prefer IPv6 OR port" if an IPv6 address is found in descriptor and ClientPreferIPv6ORPort is set. Filter "preferred OR port" through the ClientUseIPv6 config option. We might want to move this test to where actual connection is being set up once we have a fall back mechanism in place. Have only non-servers pick an IPv6 address for the first hop: We don't want relays to connect over IPv6 yet. (IPv6 has never been used for second or third hops.) Implements ticket 5535. Linus Nordberg2012-09-04
* | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-08-27
|\|
| * Disable extending to private/internal addresses by default•••This is important, since otherwise an attacker can use timing info to probe the internal network. Also, add an option (ExtendAllowPrivateAddresses) so that TestingTorNetwork won't break. Fix for bug 6710; bugfix on all released versions of Tor. Nick Mathewson2012-08-27
* | Move ipv6_preferred from routerinfo_t to node_t.•••Move extend_info_from_router() from circuitbuild.c to router.c and make it static. Add get_configured_bridge_by_orports_digest() and have get_configured_bridge_by_routerinfo() and node_is_a_configured_bridge() use it. We now consider all OR ports of a bridge when looking for it. Move node_get_*_orport to nodelist.c. Fix a cut'n'paste error in header of nodelist.h. Add node_assert_ok(). Add router_get_all_orports(). It's duplicating code from node_get_all_orports(). Worth fixing at the cost of complicating the API slightly? Linus Nordberg2012-08-23
* | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-08-17
|\|
| * Merge remote-tracking branch 'public/bug6507' into maint-0.2.3Nick Mathewson2012-08-17
| |\
| | * Fix spaces from last patchNick Mathewson2012-08-09
| | * Don't infer we have a FooPort from the presence of a FooPort line•••Thanks to the changes we started making with SocksPort and friends in 0.2.3.3-alpha, any of our code that did "if (options->Sockport)" became wrong, since "SocksPort 0" would make that test true whereas using the default SocksPort value would make it false. (We didn't actually do "if (options->SockPort)" but we did have tests for TransPort. When we moved DirPort, ORPort, and ControlPort over to the same system in 0.2.3.9-alpha, the problem got worse, since our code is littered with checks for DirPort and ORPort as booleans. This code renames the current linelist-based FooPort options to FooPort_lines, and adds new FooPort_set options which get set at parse-and-validate time on the or_options_t. FooPort_set is true iff we will actually try to open a listener of the given type. (I renamed the FooPort options rather than leave them alone so that every previous user of a FooPort would need to get inspected, and so that any new code that forgetfully uses FooPort will need fail to compile.) Fix for bug 6507. Nick Mathewson2012-08-09
* | | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-08-17
|\| |
| * | Address Nick's comments from code review.•••Also promote log messages to notice and rate-limit them. Mike Perry2012-08-16
| * | Bug 6475: Explicitly track our path bias state.•••This is done to avoid spurious warns. Additional log lines are also added to try to track down the codepaths where we are somehow overcounting success counts. Mike Perry2012-08-15
| |/
* | Use new replaycache_t structure for replay detection in rend_service_introduce()Andrea Shepard2012-07-31
* | Add config option AuthDirPublishIPv6.•••Test for config option AuthDirPublishIPv6 == 1 rather than for running as a bridge authority when deciding whether to care or not about IPv6 OR ports in descriptors. Implements enhancement #6406. Linus Nordberg2012-07-19
* | Add configure option AuthDirHasIPv6Connectivity.•••Implements enhancement 5974. Linus Nordberg2012-07-19
* | Add "a" line to status document.Linus Nordberg2012-07-19
* | Add last_reachable and testing_since for IPv6 OR port.Linus Nordberg2012-07-19
* | Move last_reachable and testing_since from routerinfo_t to node_t.Linus Nordberg2012-07-19
|/
* Defend against entry node path bias attacks•••The defense counts the circuit failure rate for each guard for the past N circuits. Failure is defined as the ability to complete a first hop, but not finish completing the circuit all the way to the exit. If the failure rate exceeds a certain amount, a notice is emitted. If it exceeds a greater amount, a warn is emitted and the guard is disabled. These values are governed by consensus parameters which we intend to tune as we perform experiments and statistical simulations. Mike Perry2012-06-14
* Merge remote-tracking branch 'public/bug3940_redux'Nick Mathewson2012-06-13
|\
| * Document ADDRMAPSRC_NONE.Nick Mathewson2012-06-11
| * An attempt at bug3940 and making AllowDotExit 0 work with MapAddress•••This time, I follow grarpamp's suggestion and move the check for .exit+AllowDotExit 0 to the top of connection_ap_rewrite_and_attach, before any rewriting occurs. This way, .exit addresses are forbidden as they arrive from a socks connection or a DNSPort request, and not otherwise. It _is_ a little more complicated than that, though. We need to treat any .exit addresses whose source is TrackHostExits as meaning that we can retry without that exit. We also need to treat any .exit address that comes from an AutomapHostsOnResolve operation as user-provided (and thus forbidden if AllowDotExits==0), so that transitioning from AllowDotExits==1 to AllowDotExits==0 will actually turn off automapped .exit addresses. Nick Mathewson2012-05-11
* | Resolve about 24 DOCDOCsNick Mathewson2012-06-05
* | Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
* | Add about 60 more DOCDOC comments to 0.2.3•••Also, try to resolve some doxygen issues. First, define a magic "This is doxygen!" macro so that we take the correct branch in various #if/#else/#endifs in order to get the right documentation. Second, add in a few grouping @{ and @} entries in order to get some variables and fields to get grouped together. Nick Mathewson2012-06-04
* | Resolve all currently pending DOCDOC items in masterNick Mathewson2012-06-04
* | Bump _WIN32_WINNT to 0x0501 throughout the code•••This tells the windows headers to give us definitions that didn't exist before XP -- like the ones that we need for IPv6 support. See bug #5861. We didn't run into this issue with mingw, since mingw doesn't respect _WIN32_WINNT as well as it should for some of its definitions. Nick Mathewson2012-05-14
* | Remove all instances of WIN32_WINNT (without leading _)•••We started adding it in 59e2c77824840f back in 2004, 8 years and 3 days ago. It's time to deprogram ourselves from this cargo cult. Nick Mathewson2012-05-14
|/