aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
Commit message (Collapse)AuthorAge
* Implement and use crypto_pk_eq_keysRobert Ransom2012-09-17
|
* Split the routerset code out of routerlist.cNick Mathewson2012-09-14
|
* Split the or_state_t portions of config.c into their own fileNick Mathewson2012-09-13
|
* Fix directory self-testing logicNick Mathewson2012-09-12
| | | | | | | | | | | | | | | | | When I removed version_supports_begindir, I accidentally removed the mechanism we had been using to make a directory cache self-test its directory port. This caused bug 6815, which caused 6814 (both in 0.2.4.2-alpha). To fix this bug, I'm replacing the "anonymized_connection" argument to directory_initiate_command_* with an enumeration to say how indirectly to connect to a directory server. (I don't want to reinstate the "version_supports_begindir" argument as "begindir_ok" or anything -- these functions already take too many arguments.) For safety, I made sure that passing 0 and 1 for 'indirection' gives the same result as you would have gotten before -- just in case I missed any 0s or 1s.
* Remove version_supports checks for versions before 0.2.2.Nick Mathewson2012-09-07
|
* Rename extend_info_alloc() --> _new()Nick Mathewson2012-09-06
| | | | | Based on a patch from Linus, regenerated so as to not conflict with Linus's 5535/6363 patches.
* fix punctuation in logsRoger Dingledine2012-09-06
|
* Fix whitespaceNick Mathewson2012-08-27
|
* Merge remote-tracking branch 'linus/bug6362'Nick Mathewson2012-08-27
|\
| * Make all relays, not only bridges, capable of advertising an IPv6 OR port.Linus Nordberg2012-08-19
| | | | | | | | Closes #6362.
* | Move ipv6_preferred from routerinfo_t to node_t.Linus Nordberg2012-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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?
* | Merge remote-tracking branch 'public/bug5124'Nick Mathewson2012-08-17
|\ \
| * | Never emit the "opt" prefix in any directory stuffNick Mathewson2012-06-28
| | | | | | | | | | | | Fix for bug 5124.
* | | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-08-17
|\ \ \ | |_|/ |/| |
| * | Don't infer we have a FooPort from the presence of a FooPort lineNick Mathewson2012-08-09
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add last_reachable and testing_since for IPv6 OR port.Linus Nordberg2012-07-19
| |
* | Address Nick's comments.George Kadianakis2012-07-12
| | | | | | | | | | | | | | | | - Add a changes/ file. - Make it compile under --enable-gcc-warnings. - Update the file-level documentation of src/or/transports.c. - Only update descriptor if at least a managed proxy was configured. - Add our external IP address to the extra-info descriptor instead of 0.0.0.0.
* | Add pluggable transport info to extra-info descriptors.George Kadianakis2012-07-03
|/
* Merge remote-tracking branch 'public/bug4657'Nick Mathewson2012-06-05
|\ | | | | | | | | Conflicts: src/or/router.c
| * Warn and ignore the MyFamily setting if BridgeRelay is also setNick Mathewson2012-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Roger explains at http://archives.seul.org/tor/talk/Nov-2011/msg00209.html : "If you list your bridge as part of your family in the relay descriptor, then everybody can learn your bridge fingerprint, and they can look up your bridge's descriptor (and thus location) at the bridge directory authority." Now, we can't stop relays from listing bridges, but we can warn when we notice a bridge listing anybody, which might help some. This fixes bug 4657; it's a fix on 0.2.0.3-alpha, where bridges were first introduced.
* | Fix "make check-spaces" issuesNick Mathewson2012-06-05
| |
* | 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.3Nick Mathewson2012-06-04
| | | | | | | | | | | | | | | | 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.
* | Merge remote-tracking branch 'public/bug5139'Nick Mathewson2012-05-16
|\ \
| * | Bridges should never set the send_unencrypted flag on any of their descsNick Mathewson2012-04-27
| | | | | | | | | | | | Fix for bug 5139.
* | | Do not publish the "git-XXX" tag in server descriptorsNick Mathewson2012-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, allow packagers to put a 'TOR_BUILD_TAG' field in the server descriptor to indicate a platform-specific value, if they need to. (According to weasel, this was his use for the git- tag previously.) This is part of 2988
* | | Merge remote-tracking branch 'asn/bug4865_take2'Nick Mathewson2012-05-11
|\ \ \
| * | | Fix issues found by nickm.George Kadianakis2012-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Document fmt_addr_impl() and friends. * Parenthesize macro arguments. * Rename get_first_listener_addrport_for_pt() to get_first_listener_addrport_string(). * Handle port_cfg_t with no_listen. * Handle failure of router_get_active_listener_port_by_type(). * Add an XXX to router_get_active_listener_port_by_type().
| * | | Introduce and use router_get_active_listener_port_by_type().George Kadianakis2012-03-31
| | | | | | | | | | | | | | | | | | | | | | | | router_get_active_listener_port_by_type() iterates all connections, trying to find a listener of a specific type, and returns its TCP port.
* | | | Fix O(n^2) performance when parsing a big pile of extrainfosNick Mathewson2012-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were doing an O(n) strlen in router_get_extrainfo_hash() for every one we tried to parse. Instead, have router_get_extrainfo_hash() take the length of the extrainfo as an argument, so that when it's called from extrainfo_parse_from_string(), it doesn't do a strlen() over the whole pile of extrainfos.
* | | | Ignore [::] when building descriptors.Linus Nordberg2012-05-03
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | This is how IPv6 says "0.0.0.0" and something we will have to translate into a globally reachable address before putting it in a descriptor. The fix is a short term solution until a real one is implemented. Closes #5146.
* | | Merge branch 'bug4438-v2'Nick Mathewson2012-04-24
|\ \ \
| * | | Tweak the bug4438 fix a little: different check, better logNick Mathewson2012-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of checking for 'rejected' and calling everything else okay, let's check for 'outdated' and call everythign else a problem. This way we don't risk missing future errors so much. When logging a message that _looks_ like an error message at info, we should mention that it isn't really a problem.
| * | | Don't exit on dirauths for some config transitionsSebastian Hahn2011-11-08
| | | |
* | | | Suppress "decided to publish new descriptor" message when not a serverNick Mathewson2012-04-02
| |/ / |/| | | | | | | | | | | | | | | | | The message only means that we're publishing a new descriptor when we are actually in some kind of server mode, and publication is on. Fix for bug 3942; bugfix on 0.2.3.2-alpha.
* | | Merge remote-tracking branch 'linus/bug4875_2'Nick Mathewson2012-03-29
|\ \ \
| * | | Make relays handle an address suggestion from a directory server giving an ↵Linus Nordberg2012-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPv6 address. last_guessed_ip becomes a tor_addr_t. Most parts of router_new_address_suggestion() learns about IPv6 (resolve_my_address() is still IPv4 only).
* | | | Move the logging of 'My line' to debug level (#5151).Linus Nordberg2012-03-19
|/ / /
* | | Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
* | | whitespace fixesNick Mathewson2012-01-16
| | |
* | | Convert instances of tor_snprintf+strdup into tor_asprintfNick Mathewson2012-01-16
| | | | | | | | | | | | | | | | | | These were found by looking for tor_snprintf() instances that were followed closely by tor_strdup(), though I probably converted some other snprintfs as well.
* | | Try to use smartlist_add_asprintf consistentlyNick Mathewson2012-01-16
| | | | | | | | | | | | | | | | | | | | | (To ensure correctness, in every case, make sure that the temporary variable is deleted, renamed, or lowered in scope, so we can't have any bugs related to accidentally relying on the no-longer-filled variable.)
* | | Advertise dirport if accountingmax is large enoughSebastian Hahn2012-01-10
| | | | | | | | | | | | | | | | | | When we have an effective bandwidthrate configured so that we cannot exceed our bandwidth limit in one accounting interval, don't disable advertising the dirport. Implements ticket 2434.
* | | Whitespace changes.Linus Nordberg2011-11-30
| | |
* | | Make the router_get_*_orport interface consistent with node_*.Linus Nordberg2011-11-30
| | |
* | | Make router_get_{prim,alt,pref}_addr_port take tor_addr_port_t *.Linus Nordberg2011-11-30
| | | | | | | | | | | | Rename to *_orport for consistency with node_*.
* | | First chunk of support for bridges on IPv6Linus Nordberg2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comments below focus on changes, see diff for added code. New type tor_addr_port_t holding an IP address and a TCP/UDP port. New flag in routerinfo_t, ipv6_preferred. This should go in the node_t instead but not now. Replace node_get_addr() with - node_get_prim_addr() for primary address, i.e. IPv4 for now - node_get_pref_addr() for preferred address, IPv4 or IPv6. Rename node_get_addr_ipv4h() node_get_prim_addr_ipv4h() for consistency. The primary address will not allways be an IPv4 address. Same for node_get_orport() -> node_get_prim_orport(). Rewrite node_is_a_configured_bridge() to take all OR ports into account. Extend argument list to extend_info_from_node and extend_info_from_router with a flag indicating if we want to use the routers primary address or the preferred address. Use the preferred address in as few situtations as possible for allowing clients to connect to bridges over IPv6.
* | | Bridges can advertise a single IPv6 address with orportNick Mathewson2011-11-30
| | | | | | | | | | | | | | | | | | This is deliberately more restrictive than we'd want to be. Needs testing!
* | | Initial support for simplest use of prop186 or-address linesNick Mathewson2011-11-30
| | | | | | | | | | | | | | | This lets a routerinfo_t have a single IPv6 or-address, and adds support for formatting and parsing those lines.