aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
AgeCommit message (Collapse)Author
2011-10-26Don't crash a bridge authority on SIGHUP if it's not in the consensusRobert Ransom
Fixes bug 2572.
2011-10-26Properly refcount client_identity_keySebastian Hahn
In a2bb0bf we started using a separate client identity key. When we are in "public server mode" (that means not a bridge) we will use the same key. Reusing the key without doing the proper refcounting leads to a segfault on cleanup during shutdown. Fix that. Also introduce an assert that triggers if our refcount falls below 0. That should never happen.
2011-10-26Add some asserts to get_{tlsclient|server}_identity_keyNick Mathewson
We now require that: - Only actual servers should ever call get_server_identity_key - If you're being a client or bridge, the client and server keys should differ. - If you're being a public relay, the client and server keys should be the same.
2011-10-26Rename get_client_identity_key to get_tlsclient_identity_keyNick Mathewson
2011-10-26Maintain separate server and client identity keys when appropriate.Robert Ransom
Fixes a bug described in ticket #988. Conflicts: src/or/main.c src/or/router.c
2011-10-26Maintain separate server and client TLS contexts.Robert Ransom
Fixes bug #988. Conflicts: src/or/main.c src/or/router.c
2011-10-26Refactor tor_tls_context_new:Robert Ransom
* Make tor_tls_context_new internal to tortls.c, and return the new tor_tls_context_t from it. * Add a public tor_tls_context_init wrapper function to replace it. Conflicts: src/or/main.c src/or/router.c
2011-10-26Add public_server_mode function.Robert Ransom
2011-09-13Generate our ssl session certs with a plausible lifetimeRoger Dingledine
Nobody but Tor uses certs on the wire with 2 hour lifetimes, and it makes us stand out. Resolves ticket 4014.
2011-05-11Hand-conversion and audit phase of memcmp transitionNick Mathewson
Here I looked at the results of the automated conversion and cleaned them up as follows: If there was a tor_memcmp or tor_memeq that was in fact "safe"[*] I changed it to a fast_memcmp or fast_memeq. Otherwise if there was a tor_memcmp that could turn into a tor_memneq or tor_memeq, I converted it. This wants close attention. [*] I'm erring on the side of caution here, and leaving some things as tor_memcmp that could in my opinion use the data-dependent fast_memcmp variant.
2011-05-11Automated conversion of memcmp to tor_memcmp/tor_mem[n]eqNick Mathewson
This commit is _exactly_ the result of perl -i -pe 's/\bmemcmp\(/tor_memcmp\(/g' src/*/*.[ch] perl -i -pe 's/\!\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*==\s*tor_memcmp\(/tor_memeq\(/g' src/*/*.[ch] perl -i -pe 's/0\s*!=\s*tor_memcmp\(/tor_memneq\(/g' src/*/*.[ch] git checkout src/common/di_ops.[ch] git checkout src/or/test.c git checkout src/common/test.h
2011-04-06Merge remote-tracking branch 'public/bug2402_again' into maint-0.2.1Nick Mathewson
2011-03-13we're not reachable if we don't have a routerinfo yetRoger Dingledine
2011-03-11Backport: Generate version tags using Git, not (broken) svn revisions.Nick Mathewson
Partial backport of daa0326aaaa85a760be94ee2360cfa61a9fb5be2 . Resolves bug 2402. Bugfix on 0.2.1.15 (for the part where we switched to git) and on 0.2.1.30 (for the part where we dumped micro-revisions.)
2011-01-03Bump copyright statements to 2011Nick Mathewson
2010-04-23finally get rid of "clique mode"Roger Dingledine
2010-02-27Update Tor Project copyright yearsNick Mathewson
2010-02-27Properly handle non-terminated stringsSebastian Hahn
Treat strings returned from signed_descriptor_get_body_impl() as not NUL-terminated. Since the length of the strings is available, this is not a big problem. Discovered by rieo.
2010-01-23Fix two rare leaks spotted by rieo.Nick Mathewson
2009-10-26Fix two memory leaks found by Coverity (CIDs 417-418)Nick Mathewson
The first happens on an error case when a controller wants an impossible directory object. The second happens when we can't write our fingerprint file.
2009-08-31Only send reachability status events on overall success/failureRoger Dingledine
We were telling the controller about CHECKING_REACHABILITY and REACHABILITY_FAILED status events whenever we launch a testing circuit or notice that one has failed. Instead, only tell the controller when we want to inform the user of overall success or overall failure. Bugfix on 0.1.2.6-alpha. Fixes bug 1075. Reported by SwissTorExit.
2009-08-11Fix possible segmentation fault on directory authorities.Karsten Loesing
The more verbose logs that were added in ee58153 also include a string that might not have been initialized. This can lead to segfaults, e.g., when setting up private Tor networks. Initialize this string with NULL.
2009-07-27Changing MaxAdvertisedBW may not need a republishSebastian Hahn
Relays no longer publish a new server descriptor if they change their MaxAdvertisedBandwidth config option but it doesn't end up changing their advertised bandwidth numbers. Bugfix on 0.2.0.28-rc; fixes bug 1026. Patch from Sebastian.
2009-07-27Write fingerprint to file and log without spacesRoger Dingledine
Now it will look like the fingerprints in our bridges documentation, and confuse fewer users.
2009-06-30another minor patch to add to 0.2.1.xRoger Dingledine
o Minor features: - If we're a relay and we change our IP address, be more verbose about the reason that made us change. Should help track down further bugs for relays on dynamic IP addresses.
2009-05-27Spell-check Tor.Nick Mathewson
2009-05-17Fix a memory leak when v3 directory authorities load their keysRoger Dingledine
and cert from disk. Bugfix on 0.2.0.1-alpha.
2009-05-04Update copyright to 2009.Karsten Loesing
2009-04-11fix a commentRoger Dingledine
svn:r19262
2009-04-01log more verbosely when we accept or decline a router descriptor,Roger Dingledine
to help track whether we received them when a relay operator claims they got sent. svn:r19213
2009-03-18Add a function to get a LongName from a routerstatus. Needed for partial ↵Nick Mathewson
bug 941 fix. svn:r19077
2009-01-28clean up r18287Roger Dingledine
svn:r18288
2009-01-28patch from matt to implement 'getinfo status/clients-seen'Roger Dingledine
svn:r18287
2009-01-21Make sure that even in the weird fiddly paths that lead to init_keys,Nick Mathewson
crypto_global_init gets called. Also have it be crypto_global_init that calls crypto_seed_rng, so we are not dependent on OpenSSL's RAND_poll in these fiddly cases. Should fix bug 907. Bugfix on 0.0.9pre6. Backport candidate. svn:r18210
2009-01-06Bugfix on r13098. Backport candidate.Roger Dingledine
When we made bridge authorities stop serving bridge descriptors over unencrypted links, we also broke DirPort reachability testing for bridges. So bridges with a non-zero DirPort were printing spurious warns to their logs. Bugfix on 0.2.0.16-alpha. Fixes bug 709. svn:r17945
2009-01-04Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson
The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
2008-12-27New controller event "clients_seen" to report a geoip-based summaryRoger Dingledine
of which countries we've seen clients from recently. Now controllers like Vidalia can show bridge operators that they're actually making a difference. svn:r17796
2008-12-26Add some early checks to keep ipv6 addresses from failing by accident. Now, ↵Nick Mathewson
they fail on purpose, at least till 0.2.2.something. svn:r17791
2008-12-23Document most undocumented variables.Nick Mathewson
svn:r17754
2008-12-22Add DOCDOC entries for undocumented static and global variables.Nick Mathewson
svn:r17739
2008-12-22Fix most DOCDOCs remaining and/or added by redox.Nick Mathewson
svn:r17734
2008-12-22Add DOCDOC comments for all undocumented functions. Add missing *s to other ↵Nick Mathewson
comments so that they will get recognized as doxygen. svn:r17729
2008-12-18Make it possible to call set_onion_key twice without leaking RAM.Nick Mathewson
svn:r17673
2008-12-18Fix bug 889: share deep-copied keys between threads to avoid races in ↵Nick Mathewson
reference counts. Bugfix on 0.1.0.1-rc. svn:r17672
2008-12-17Make return code from router_add_to_routerlist a nice sensible enum. Based ↵Nick Mathewson
on patch from Sebastian. svn:r17656
2008-12-10Bug 691 fix: do not shutdown Tor servers right away if the network is down.Nick Mathewson
svn:r17566
2008-12-10When a directory authority gives us a new guess for our IP address, Roger Dingledine
log which authority we used. Hopefully this will help us debug the recent complaints about bad IP address guesses. svn:r17549
2008-10-01Now NodeFamily and MyFamily config options allow spaces inRoger Dingledine
identity fingerprints, so it's easier to paste them in. Suggested by Lucky Green. svn:r17021
2008-09-26Proposal 152 implementation from Josh Albrecht, with tweaks.Nick Mathewson
svn:r16983
2008-09-25Add country-code support to configured node lists to implement the ↵Nick Mathewson
ever-popular "no exits in Monaco" feature (ExcludeExitNodes {MC}). Also allow country codes and IP ranges in ExitNodes. (EntryNodes needs more work.) Based on code by Robert Hogan. Needs more testing. svn:r16966