aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
Commit message (Expand)AuthorAge
...
| * | | 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 network•••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. Nick Mathewson2011-11-28
|/ / /
* / / fix trivial typo•••somebody should s/authoritative directory server/directory authority/g at some point Roger Dingledine2011-11-16
|/ /
* | Merge branch 'maint-0.2.2'Roger Dingledine2011-09-13
|\|
| * Merge branch 'maint-0.2.1' into maint-0.2.2•••Conflicts: src/or/main.c src/or/router.c Roger Dingledine2011-09-13
| |\
| | * Generate our ssl session certs with a plausible lifetime•••Nobody but Tor uses certs on the wire with 2 hour lifetimes, and it makes us stand out. Resolves ticket 4014. Roger Dingledine2011-09-13
* | | fix a const warningNick Mathewson2011-09-07
* | | Report reason for generating descriptor in an HTTP header•••Suggested by arma; based on 3327. Nick Mathewson2011-09-07
* | | Upload descriptors more often when recent desc is unlisted•••Right now we only force a new descriptor upload every 18 hours. This can make servers become unlisted if they upload a descriptor at time T which the authorities reject as being "too similar" to one they uploaded before. Nothing will actually make the server upload a new descriptor later on, until another 18 hours have passed. This patch changes the upload behavior so that the 18 hour interval applies only when we're listed in a live consensus with a descriptor published within the last 18 hours. Otherwise--if we're not listed in the live consensus, or if we're listed with a publication time over 18 hours in the past--we upload a new descriptor every 90 minutes. This is an attempted bugfix for #3327. If we merge it, it should obsolete #535. Nick Mathewson2011-09-07
* | | Parse prop171 options; refactor listener/port option code•••Proposal 171 gives us a new syntax for parsing client port options. You can now have as many FooPort options as you want (for Foo in Socks, Trans, DNS, NATD), and they can have address:port arguments, and you can specify the level of isolation on those ports. Additionally, this patch refactors the client port parsing logic to use a new type, port_cfg_t. Previously, ports to be bound were half-parsed in config.c, and later re-parsed in connection.c when we're about to bind them. Now, parsing a port means converting it into a port_cfg_t, and binding it uses only a port_cfg_t, without needing to parse the user-provided strings at all. We should do a related refactoring on other port types. For control ports, that'll be easy enough. For ORPort and DirPort, we'll want to do this when we solve proposal 118 (letting servers bind to and advertise multiple ports). This implements tickets 3514 and 3515. Nick Mathewson2011-07-19
* | | Merge branch 'bug3263'Nick Mathewson2011-07-07
|\ \ \
| * | | don't mark our descriptor dirty if our onion key hasn't changedRoger Dingledine2011-05-21
* | | | Make the get_options() return const•••This lets us make a lot of other stuff const, allows the compiler to generate (slightly) better code, and will make me get slightly fewer patches from folks who stick mutable stuff into or_options_t. const: because not every input is an output! Nick Mathewson2011-06-14
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-14
|\ \ \ \ | | |/ / | |/| |
| * | | Make ControlSocketsGroupWritable work with User.•••Original message from bug3393: check_private_dir() to ensure that ControlSocketsGroupWritable is safe to use. Unfortunately, check_private_dir() only checks against the currently running user… which can be root until privileges are dropped to the user and group configured by the User config option. The attached patch fixes the issue by adding a new effective_user argument to check_private_dir() and updating the callers. It might not be the best way to fix the issue, but it did in my tests. (Code by lunar; changelog by nickm) Jérémy Bobbio2011-06-14
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/or/dirserv.c Nick Mathewson2011-06-02
|\| | |
| * | | Fix unit test failure in dir/formats•••options->DirPort is 0 in the unit tests, so router_get_advertised_dir_port() would return 0 so we wouldn't pick a dirport. This isn't what we want for the unit tests. Fixes bug introduced in 95ac3ea5946. Sebastian Hahn2011-06-02
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-30
|\| | |
| * | | Merge branch 'bug3216_v2' into maint-0.2.2Nick Mathewson2011-05-30
| |\ \ \
| | * | | Don't try to build descriptors when router_get_advertised_or_port()==0•••The previous attempt was incomplete: it told us not to publish a descriptor, but didn't stop us from generating one. Now we treat an absent OR port the same as not knowing our address. (This means that when we _do_ get an OR port, we need to mark the descriptor dirty.) More attempt to fix bug3216. Nick Mathewson2011-05-24
| | * | | Don't build descriptors if ORPort auto is set and we have no OR listener•••This situation can happen easily if you set 'ORPort auto' and 'AccountingMax'. Doing so means that when you have no ORPort, you won't be able to set an ORPort in a descriptor, so instead you would just generate lots of invalid descriptors, freaking out all the time. Possible fix for 3216; fix on 0.2.2.26-beta. Nick Mathewson2011-05-24
| | |/ /
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'•••The conflicts were mainly caused by the routerinfo->node transition. Conflicts: src/or/circuitbuild.c src/or/command.c src/or/connection_edge.c src/or/directory.c src/or/dirserv.c src/or/relay.c src/or/rendservice.c src/or/routerlist.c Nick Mathewson2011-05-30
|\| | |
| * | | Merge branch 'bug3045' into maint-0.2.2•••Conflicts: src/or/circuitbuild.c Nick Mathewson2011-05-30
| |\ \ \ | | |/ / | |/| |
| | * | Improve comments and defensive programming for 3045•••The comment fixes are trivial. The defensive programming trick is to tolerate receiving NULL inputs on the describe functions. That should never actually happen, but it seems like the likeliest mistake for us to make in the future. Nick Mathewson2011-05-30
| | * | Log descriptions of nodes, not just nicknames.•••This patch introduces a few new functions in router.c to produce a more helpful description of a node than its nickame, and then tweaks nearly all log messages taking a nickname as an argument to call these functions instead. There are a few cases where I left the old log messages alone: in these cases, the nickname was that of an authority (whose nicknames are useful and unique), or the message already included an identity and/or an address. I might have missed a couple more too. This is a fix for bug 3045. Nick Mathewson2011-05-15
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/common/Makefile.am src/or/control.c Nick Mathewson2011-05-23
|\| | |
| * | | naked constants are uglyRoger Dingledine2011-05-21
| * | | finish a comment nickm started in 8ebceeb3Roger Dingledine2011-05-21
* | | | Merge branch 'maint-0.2.2'Roger Dingledine2011-05-21
|\| | |
| * | | remove some (confusing) dead codeRoger Dingledine2011-05-21
* | | | Merge branch 'maint-0.2.2'Roger Dingledine2011-05-20
|\| | |
| * | | log the reason for publishing a new relay descriptor•••now we have a better chance of hunting down the root cause of bug 1810. Roger Dingledine2011-05-19
| |/ /
* | | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/or/config.c src/or/dirserv.c src/or/or.h Nick Mathewson2011-05-13
|\| |
| * | Advertise correct DirPort/ORPort when configured with "auto"•••We'll eventually want to do more work here to make sure that the ports are stable over multiple invocations. Otherwise, turning your node on and off will get you a new DirPort/ORPort needlessly. Nick Mathewson2011-05-13
* | | Reapply the automated memcmp conversion to 0.2.3 to catch newly added memcmpsNick Mathewson2011-05-11
* | | Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023•••Conflicts in various places, mainly node-related. Resolved them in favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022. src/common/Makefile.am src/or/circuitlist.c src/or/connection_edge.c src/or/directory.c src/or/microdesc.c src/or/networkstatus.c src/or/router.c src/or/routerlist.c src/test/test_util.c Nick Mathewson2011-05-11
|\| |
| * | Merge remote-tracking branch 'public/3122_memcmp_squashed' into bug3122_memcm...•••Conflicts throughout. All resolved in favor of taking HEAD and adding tor_mem* or fast_mem* ops as appropriate. src/common/Makefile.am src/or/circuitbuild.c src/or/directory.c src/or/dirserv.c src/or/dirvote.c src/or/networkstatus.c src/or/rendclient.c src/or/rendservice.c src/or/router.c src/or/routerlist.c src/or/routerparse.c src/or/test.c Nick Mathewson2011-05-11
| |\|
| | * Hand-conversion and audit phase of memcmp transition•••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. Nick Mathewson2011-05-11
| | * Automated conversion of memcmp to tor_memcmp/tor_mem[n]eq•••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 Nick Mathewson2011-05-11
| | * Merge remote-tracking branch 'public/bug2402_again' into maint-0.2.1Nick Mathewson2011-04-06
| | |\
| | | * Backport: Generate version tags using Git, not (broken) svn revisions.•••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.) Nick Mathewson2011-03-11
* | | | Code to make clients fetch and use microdescriptors for circuit building•••To turn this on, set UseMicrodescriptors to "1" (or "auto" if you want it on-if-you're-a-client). It should go auto-by-default once 0.2.3.1-alpha is released. Because of our node logic, directory caches will never use microdescriptors when they have the right routerinfo available. Nick Mathewson2011-05-05
* | | | Replace _AUTHORITY enum values with _DIRINFO values (automted)Nick Mathewson2011-05-05
* | | | Automated rename from authority_type_t to dirinfo_type_t•••We were already overloading this type to mean "a directory that can serve us X" in addition to "a directory that is an authority for X." Nick Mathewson2011-05-05
* | | | Add a new configuration type, "AUTOBOOL", to handle 1/0/auto types•••We only have one of these now, but I'm about to add a few more. Yes, I have already thought of the "Filenotfoundian logic" joke. Nick Mathewson2011-05-05
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-28
|\| | |
| * | | Avoid false positives from proxy_mode()•••Previously it would erroneously return true if ListenAddr was set for a client port, even if that port itself was 0. This would give false positives, which were not previously harmful... but which were about to become. Nick Mathewson2011-04-28