aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
Commit message (Collapse)AuthorAge
* 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.
* | | Initial hacking for proposal 186.Nick Mathewson2011-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge remote-tracking branch 'asn-mytor/bug4548_take2'Nick Mathewson2011-11-29
|\ \ \
| * | | Write dynamic DH parameters to a file.George Kadianakis2011-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Simply initialize TLS context if DynamicDHGroups change.George Kadianakis2011-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | 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
| | | |
| * | | Move store_dynamic_prime() to crypto.c.George Kadianakis2011-11-24
| | | |
| * | | Tone down the logging.George Kadianakis2011-11-24
| | | |
| * | | Implement dynamic prime reading and storing to disk.George Kadianakis2011-11-24
| | | |
| * | | Introduce the DynamicPrimes configuration option.George Kadianakis2011-11-24
| | | |
* | | | New 'DisableNetwork' option to prevent Tor from using the networkNick Mathewson2011-11-28
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some controllers want this so they can mess with Tor's configuration for a while via the control port before actually letting Tor out of the house. We do this with a new DisableNetwork option, that prevents Tor from making any outbound connections or binding any non-control listeners. Additionally, it shuts down the same functionality as shuts down when we are hibernating, plus the code that launches directory downloads. To make sure I didn't miss anything, I added a clause straight to connection_connect, so that we won't even try to open an outbound socket when the network is disabled. In my testing, I made this an assert, but since I probably missed something, I've turned it into a BUG warning for testing.
* / / fix trivial typoRoger Dingledine2011-11-16
|/ / | | | | | | | | somebody should s/authoritative directory server/directory authority/g at some point
* | Merge branch 'maint-0.2.2'Roger Dingledine2011-09-13
|\|
| * Merge branch 'maint-0.2.1' into maint-0.2.2Roger Dingledine2011-09-13
| |\ | | | | | | | | | | | | | | | Conflicts: src/or/main.c src/or/router.c
| | * Generate our ssl session certs with a plausible lifetimeRoger Dingledine2011-09-13
| | | | | | | | | | | | | | | Nobody but Tor uses certs on the wire with 2 hour lifetimes, and it makes us stand out. Resolves ticket 4014.
* | | fix a const warningNick Mathewson2011-09-07
| | |