aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
Commit message (Collapse)AuthorAge
* 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
| | |
* | | Report reason for generating descriptor in an HTTP headerNick Mathewson2011-09-07
| | | | | | | | | | | | Suggested by arma; based on 3327.
* | | Upload descriptors more often when recent desc is unlistedNick Mathewson2011-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Parse prop171 options; refactor listener/port option codeNick Mathewson2011-07-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | 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 constNick Mathewson2011-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-14
|\ \ \ \ | | |/ / | |/| |
| * | | Make ControlSocketsGroupWritable work with User.Jérémy Bobbio2011-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-06-02
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/or/dirserv.c
| * | | Fix unit test failure in dir/formatsSebastian Hahn2011-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | 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()==0Nick Mathewson2011-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | Don't build descriptors if ORPort auto is set and we have no OR listenerNick Mathewson2011-05-24
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Merge branch 'bug3045' into maint-0.2.2Nick Mathewson2011-05-30
| |\ \ \ | | |/ / | |/| | | | | | | | | | Conflicts: src/or/circuitbuild.c
| | * | Improve comments and defensive programming for 3045Nick Mathewson2011-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | Log descriptions of nodes, not just nicknames.Nick Mathewson2011-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-23
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/Makefile.am src/or/control.c
| * | | 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 descriptorRoger Dingledine2011-05-19
| |/ / | | | | | | | | | now we have a better chance of hunting down the root cause of bug 1810.
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-13
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/or/config.c src/or/dirserv.c src/or/or.h
| * | Advertise correct DirPort/ORPort when configured with "auto"Nick Mathewson2011-05-13
| | | | | | | | | | | | | | | | | | 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.
* | | 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_023Nick Mathewson2011-05-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Merge remote-tracking branch 'public/3122_memcmp_squashed' into ↵Nick Mathewson2011-05-11
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug3122_memcmp_022 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
| | * Hand-conversion and audit phase of memcmp transitionNick Mathewson2011-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * Automated conversion of memcmp to tor_memcmp/tor_mem[n]eqNick Mathewson2011-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * 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.Nick Mathewson2011-03-11
| | | | | | | | | | | | | | | | | | | | | | | | 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.)
* | | | Code to make clients fetch and use microdescriptors for circuit buildingNick Mathewson2011-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Replace _AUTHORITY enum values with _DIRINFO values (automted)Nick Mathewson2011-05-05
| | | |
* | | | Automated rename from authority_type_t to dirinfo_type_tNick Mathewson2011-05-05
| | | | | | | | | | | | | | | | | | | | 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."
* | | | Add a new configuration type, "AUTOBOOL", to handle 1/0/auto typesNick Mathewson2011-05-05
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-28
|\| | |
| * | | Avoid false positives from proxy_mode()Nick Mathewson2011-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge maint-0.2.2 for the bug1090-part1-squashed branchNick Mathewson2011-04-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved conflicts in: doc/tor.1.txt src/or/circuitbuild.c src/or/circuituse.c src/or/connection_edge.c src/or/connection_edge.h src/or/directory.c src/or/rendclient.c src/or/routerlist.c src/or/routerlist.h These were mostly releated to the routerinfo_t->node_t conversion.
| * | | Fix a log msgSebastian Hahn2011-04-26
| | | |
| * | | If we're excluded, and StrictNodes is set, do not do self-tests.Nick Mathewson2011-04-26
| | | |
| * | | three more cases where maybe we want to excludeRoger Dingledine2011-04-26
| | | |
* | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-03-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed conflict: router_get_my_routerinfo now returns const Conflicts: src/or/router.c