summaryrefslogtreecommitdiff
path: root/src/or/main.c
AgeCommit message (Collapse)Author
2016-06-11Merge branch 'bug19180_easy_squashed'Nick Mathewson
2016-06-11Add -Wmissing-variable-declarations, with attendant fixesNick Mathewson
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
2016-05-30Replace nearly all XXX0vv comments with smarter onesNick Mathewson
So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we had better revisit this comment and fix it!" But we have a huge pile of such comments accumulated for a large number of released versions! Not cool. So, here's what I tried to do: * 0.2.9 and 0.2.8 are retained, since those are not yet released. * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks quite important!" * The others, after one-by-one examination, are downgraded to plain old XXX. Which doesn't mean they aren't a problem -- just that they cannot possibly be a release-blocking problem.
2016-05-19Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-19Merge branch 'bug18809_028_squashed' into maint-0.2.8Nick Mathewson
2016-05-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-16touchups and refactorings on bug 18616 branchRoger Dingledine
no behavior changes
2016-05-09close other consensus fetches when we get a consensusRoger Dingledine
not once per second, and only do it when a consensus arrives
2016-05-09fix typos/etc before i go nuts on #18809Roger Dingledine
2016-04-14Merge branch 'assert_nonfatal_squashed'Nick Mathewson
2016-04-14Add new tor_assert_nonfatal*() macros.Nick Mathewson
Unlike tor_assert(), these macros don't abort the process. They're good for checking conditions we want to warn about, but which don't warrant a full crash. This commit also changes the default implementation for tor_fragile_assert() to tor_assert_nonfatal_unreached_once(). Closes ticket 18613.
2016-04-13fix typos/etc before i go nuts on #18809Roger Dingledine
2016-03-28Fix memory leaks that stopped chutney working with asanNick Mathewson
2016-03-26Fix all doxygen warnings (other than missing docs)Nick Mathewson
2016-03-26Clarify excess consensus connection cleanup by adding commentsteor (Tim Wilson-Brown)
Comment-only change
2016-03-22Merge remote-tracking branch 'public/bug18253'Nick Mathewson
2016-03-15Sandbox: Don't preseed getaddrinfo(gethostname()) in client mode.Nick Mathewson
If we're a server with no address configured, resolve_my_hostname will need this. But not otherwise. And the preseeding itself can consume a few seconds if like tails we have no resolvers. Fixes bug 18548.
2016-03-15Fix whitespace.Nick Mathewson
2016-03-14Make unix sockets work with the linux seccomp2 sandbox againNick Mathewson
I didn't want to grant blanket permissions for chmod() and chown(), so here's what I had to do: * Grant open() on all parent directories of a unix socket * Write code to allow chmod() and chown() on a given file only. * Grant chmod() and chown() on the unix socket.
2016-03-14Merge remote-tracking branch 'public/bug16248_027'Nick Mathewson
2016-03-14Add comments to connection_check_event().Nick Mathewson
2016-03-11Change behavior on missing/present event to warn instead of asserting.Nick Mathewson
Add a changes file.
2016-03-11If we start/stop reading on a dnsserv connection, don't assert.Nick Mathewson
Fixes bug 16248. Patch from cypherpunks. Bugfix on 0.2.0.1-alpha.
2016-02-27Update the copyright year.Nick Mathewson
2016-02-24Make the sandbox work again with chutney.Nick Mathewson
Previously, we had a problem due to the check_private_dir() rewrite. Bug not in any released Tor.
2016-02-24Remove the freelist from memarea.cNick Mathewson
This is in accordance with our usual policy against freelists, now that working allocators are everywhere. It should also make memarea.c's coverage higher. I also doubt that this code ever helped performance.
2016-02-22refactor directory_info_has_arrived so we can quiet the logsRoger Dingledine
no actual behavior changes
2016-02-10Merge remote-tracking branch 'teor/bug18208'Nick Mathewson
2016-02-10Merge branch 'bug17682_squashed'Nick Mathewson
2016-02-10Bulletproof the safe_timer_diff functionNick Mathewson
Originally it can overflow in some weird cases. Now it should no longer be able to do so. Additionally, limit main's timers to 30 days rather than to 38 years; we don't actually want any 38-year timers. Closes bug 17682.
2016-02-06Removed dead code in main.cAlec Heifetz
2016-02-02Update ExitPolicy when interface addresses changeteor (Tim Wilson-Brown)
Tor exit relays reject local interface addresses in their exit policy. Make sure those policies are updated when interface addresses change.
2016-01-18Merge remote-tracking branch 'origin/maint-0.2.7'Nick Mathewson
2016-01-18Merge remote-tracking branch 'teor/bug18050' into maint-0.2.7Nick Mathewson
2016-01-18Check ORPort and DirPort reachability before publishing a relay descriptorteor (Tim Wilson-Brown)
Otherwise, relays publish a descriptor with DirPort 0 when the DirPort reachability test takes longer than the ORPort reachability test. Closes bug #18050. Reported by "starlight", patch by "teor". Bugfix on 0.1.0.1-rc, commit a1f1fa6ab on 27 Feb 2005.
2016-01-03Fix a comment typo in main.cteor (Tim Wilson-Brown)
2015-12-17Merge branch 'maint-0.2.7'Nick Mathewson
2015-12-17Add some more ed25519 key files to the seccomp sandbox listNick Mathewson
Fixes bug 17675; bugfix on 0.2.7.3-alpha.
2015-12-17Conform to the type signature of setsockopt(2)cypherpunks
According to the POSIX standard the option value is a pointer to void and the option length a socklen_t. The Windows implementation makes the option value be a pointer to character and the option length an int. Casting the option value to a pointer to void conforms to the POSIX standard while the implicit cast to a pointer to character conforms to the Windows implementation. The casts of the option length to the socklen_t data type conforms to the POSIX standard. The socklen_t data type is actually an alias of an int so it also conforms to the Windows implementation.
2015-12-16Prop210: Close excess connections once a consensus is downloadingteor (Tim Wilson-Brown)
Once tor is downloading a usable consensus, any other connection attempts are not needed. Choose a connection to keep, favouring: * fallback directories over authorities, * connections initiated earlier over later connections Close all other connections downloading a consensus.
2015-12-16Prop210: Add schedules for simultaneous client consensus downloadsteor (Tim Wilson-Brown)
Prop210: Add attempt-based connection schedules Existing tor schedules increment the schedule position on failure, then retry the connection after the scheduled time. To make multiple simultaneous connections, we need to increment the schedule position when making each attempt, then retry a (potentially simultaneous) connection after the scheduled time. (Also change find_dl_schedule_and_len to find_dl_schedule, as it no longer takes or returns len.) Prop210: Add multiple simultaneous consensus downloads for clients Make connections on TestingClientBootstrapConsensus*DownloadSchedule, incrementing the schedule each time the client attempts to connect. Check if the number of downloads is less than TestingClientBootstrapConsensusMaxInProgressTries before trying any more connections.
2015-12-10Assert when the TLS contexts fail to initializecypherpunks
2015-12-07Update comment: get_connection_array no longer takes "n"teor (Tim Wilson-Brown)
2015-11-25Merge branch 'bug17686_v2_027'Nick Mathewson
2015-11-25Make crypto_seed_rng() and crypto_rand() less scary.Nick Mathewson
These functions must really never fail; so have crypto_rand() assert that it's working okay, and have crypto_seed_rng() demand that callers check its return value. Also have crypto_seed_rng() check RAND_status() before returning.
2015-11-19Merge remote-tracking branch 'public/decouple_conn_attach_2'Nick Mathewson
2015-11-18Fix a startup time assert caused by periodic events not being initialized.Yawning Angel
Loading a on disk bridge descriptor causes a directory download to be scheduled, which asserts due to the periodic events not being initialized yet. Fixes bug #17635, not in any released version of tor.
2015-11-17windows already has a CALLBACK macro...Nick Mathewson
2015-11-17Fix a server-side crash on DNS initNick Mathewson
2015-11-17Some unit tests now require that periodic events be initialized.Nick Mathewson