aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
Commit message (Expand)AuthorAge
...
* | Merge remote-tracking branch 'linus/bug6362'Nick Mathewson2012-08-27
|\ \
| * | Make all relays, not only bridges, capable of advertising an IPv6 OR port.•••Closes #6362. Linus Nordberg2012-08-19
* | | 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 'public/bug5124'Nick Mathewson2012-08-17
|\ \ \
| * | | Never emit the "opt" prefix in any directory stuff•••Fix for bug 5124. Nick Mathewson2012-06-28
* | | | 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 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
| |/
* | Add last_reachable and testing_since for IPv6 OR port.Linus Nordberg2012-07-19
* | Address Nick's comments.•••- 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. George Kadianakis2012-07-12
* | Add pluggable transport info to extra-info descriptors.George Kadianakis2012-07-03
|/
* Merge remote-tracking branch 'public/bug4657'•••Conflicts: src/or/router.c Nick Mathewson2012-06-05
|\
| * Warn and ignore the MyFamily setting if BridgeRelay is also set•••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. Nick Mathewson2012-05-24
* | 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.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
* | Merge remote-tracking branch 'public/bug5139'Nick Mathewson2012-05-16
|\ \
| * | Bridges should never set the send_unencrypted flag on any of their descs•••Fix for bug 5139. Nick Mathewson2012-04-27
* | | Do not publish the "git-XXX" tag in server descriptors•••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 Nick Mathewson2012-05-11
* | | Merge remote-tracking branch 'asn/bug4865_take2'Nick Mathewson2012-05-11
|\ \ \
| * | | Fix issues found by nickm.•••* 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(). George Kadianakis2012-04-12
| * | | Introduce and use router_get_active_listener_port_by_type().•••router_get_active_listener_port_by_type() iterates all connections, trying to find a listener of a specific type, and returns its TCP port. George Kadianakis2012-03-31
* | | | Fix O(n^2) performance when parsing a big pile of extrainfos•••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. Nick Mathewson2012-05-10
* | | | Ignore [::] when building descriptors.•••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. Linus Nordberg2012-05-03
| |/ / |/| |
* | | Merge branch 'bug4438-v2'Nick Mathewson2012-04-24
|\ \ \
| * | | Tweak the bug4438 fix a little: different check, better log•••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. Nick Mathewson2012-04-24
| * | | Don't exit on dirauths for some config transitionsSebastian Hahn2011-11-08
* | | | Suppress "decided to publish new descriptor" message when not a server•••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. Nick Mathewson2012-04-02
| |/ / |/| |
* | | Merge remote-tracking branch 'linus/bug4875_2'Nick Mathewson2012-03-29
|\ \ \
| * | | Make relays handle an address suggestion from a directory server giving an IP...•••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). Linus Nordberg2012-03-28
* | | | Move the logging of 'My line' to debug level (#5151).Linus Nordberg2012-03-19
|/ / /
* | | Rename nonconformant identifiers.•••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; Nick Mathewson2012-01-18
* | | whitespace fixesNick Mathewson2012-01-16
* | | Convert instances of tor_snprintf+strdup into tor_asprintf•••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. Nick Mathewson2012-01-16
* | | Try to use smartlist_add_asprintf consistently•••(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.) Nick Mathewson2012-01-16
* | | Advertise dirport if accountingmax is large enough•••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. Sebastian Hahn2012-01-10
* | | 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 *.•••Rename to *_orport for consistency with node_*. Linus Nordberg2011-11-30
* | | First chunk of support for bridges on IPv6•••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. Linus Nordberg2011-11-30
* | | Bridges can advertise a single IPv6 address with orport•••This is deliberately more restrictive than we'd want to be. Needs testing! Nick Mathewson2011-11-30
* | | Initial support for simplest use of prop186 or-address lines•••This lets a routerinfo_t have a single IPv6 or-address, and adds support for formatting and parsing those lines. Nick Mathewson2011-11-30
* | | Initial hacking for proposal 186.•••This code handles the new ORPort options, and incidentally makes all remaining port types use the new port configuration systems. There are some rough edges! It doesn't do well in the case where your Address says one thing but you say to Advertise another ORPort. It doesn't handle AllAddrs. It doesn't actually advertise anything besides the first listed advertised IPv4 ORPort and DirPort. It doesn't do port forwarding to them either. It's not tested either, it needs more documentation, and it probably forgets to put the milk back in the refrigerator. Nick Mathewson2011-11-30
* | | Merge remote-tracking branch 'asn-mytor/bug4548_take2'Nick Mathewson2011-11-29
|\ \ \
| * | | Write dynamic DH parameters to a file.•••Instead of only writing the dynamic DH prime modulus to a file, write the whole DH parameters set for forward compatibility. At the moment we only accept '2' as the group generator. The DH parameters gets stored in base64-ed DER format to the 'dynamic_dh_params' file. George Kadianakis2011-11-26
| * | | Simply initialize TLS context if DynamicDHGroups change.•••We used to do init_keys() if DynamicDHGroups changed after a HUP, so that the dynamic DH modulus was stored on the disk. Since we are now doing dynamic DH modulus storing in crypto.c, we can simply initialize the TLS context and be good with it. Introduce a new function router_initialize_tls_context() which initializes the TLS context and use it appropriately. George Kadianakis2011-11-25
| * | | Do dynamic DH modulus storing in crypto.c.George Kadianakis2011-11-25
| * | | Rename 'dynamic prime' to 'dynamic DH modulus'.George Kadianakis2011-11-25
| * | | s/DynamicPrimes/DynamicDHGroups/gGeorge Kadianakis2011-11-25
| * | | Move crypto_get_stored_dynamic_prime() to crypto.cGeorge Kadianakis2011-11-24