summaryrefslogtreecommitdiff
path: root/src/or/control.c
AgeCommit message (Collapse)Author
2016-10-17Write a bunch of module documentation.Nick Mathewson
This commit adds or improves the module-level documenation for: buffers.c circuitstats.c command.c connection_edge.c control.c cpuworker.c crypto_curve25519.c crypto_curve25519.h crypto_ed25519.c crypto_format.c dircollate.c dirserv.c dns.c dns_structs.h fp_pair.c geoip.c hibernate.c keypin.c ntmain.c onion.c onion_fast.c onion_ntor.c onion_tap.c periodic.c protover.c protover.h reasons.c rephist.c replaycache.c routerlist.c routerparse.c routerset.c statefile.c status.c tor_main.c workqueue.c In particular, I've tried to explain (for each documented module) what each module does, what's in it, what the big idea is, why it belongs in Tor, and who calls it. In a few cases, I've added TODO notes about refactoring opportunities. I've also renamed an argument, and fixed a few DOCDOC comments.
2016-09-13Refactor Single Onion code to improve consistencyteor
* Check consistency between the two single onion torrc options * Use the more relevant option each time we check for single onion mode * Clarify log messages * Clarify comments * Otherwise, no behaviour change
2016-09-13Ephemeral Single Onion Services must have the NonAnonymous ADD_ONION flagteor
Tor checks that the flag matches the configured onion service anonymity. Tor refuses to create unflagged onion service using ADD_ONION, if they would be non-anonymous. The error is: 512 Tor is in non-anonymous onion mode Similarly, if the NonAnonymous flag is present, and Tor has the default anonymous onion config: 512 Tor is in anonymous onion mode
2016-08-19Merge remote-tracking branch 'public/deprecation_v2'Nick Mathewson
2016-08-12Merge remote-tracking branch 'public/Fix_19450'Nick Mathewson
2016-08-03Add new warn_deprecated option to config_assign*().Nick Mathewson
Also, collapse all the config_assign*() options into a flags argument, since having two boolean arguments was already confusing.
2016-08-02Remove/fix remaining evbuffer referencesNick Mathewson
2016-08-02Bufferevent removal: remove HAS_BUFFEREVENT macros and usageNick Mathewson
This is another way that we had bufferevents-only code marked.
2016-07-29Keep make check-spaces happyAndrea Shepard
2016-07-28Fix a huge pile of -Wshadow warnings.Nick Mathewson
These appeared on some of the Jenkins platforms. Apparently some GCCs care when you shadow globals, and some don't.
2016-07-28Merge branch 'bug18902_squashed'Nick Mathewson
2016-07-28Fix all -Wshadow warnings on LinuxNick Mathewson
This is a partial fix for 18902.
2016-07-08Merge remote-tracking branch 'sebastian/libevent2'Nick Mathewson
2016-07-04Raise libevent dependency to 2.0.10-stable or newerSebastian Hahn
Only some very ancient distributions don't ship with Libevent 2 anymore, even the oldest supported Ubuntu LTS version has it. This allows us to get rid of a lot of compat code.
2016-07-01Avoid disclosing exit IP addresses in exit policies by defaultteor (Tim Wilson-Brown)
From 0.2.7.2-alpha onwards, Exits would reject all the IP addresses they knew about in their exit policy. But this may have disclosed addresses that were otherwise unlisted. Now, only advertised addresses are rejected by default by ExitPolicyRejectPrivate. All known addresses are only rejected when ExitPolicyRejectLocalInterfaces is explicitly set to 1.
2016-06-30A little more specificity in documentation for getinfo download/ stuffNick Mathewson
Also, a const.
2016-06-29Expose GETINFO download status statics for test suite and make things mockableAndrea Shepard
2016-06-29Add bridge descriptor download status queries to GETINFOAndrea Shepard
2016-06-29Add router descriptor download status queries to GETINFOAndrea Shepard
2016-06-29Expose authority certificate download statuses on the control portAndrea Shepard
2016-06-27Expose consensus download statuses on the control portAndrea Shepard
2016-06-20Patch from dgoulet: fix a base16 problem that manifested w stemNick Mathewson
2016-06-20Make base16_decodes return number of decoded bytesnikkolasg
base16_decodes() now returns the number of decoded bytes. It's interface changes from returning a "int" to a "ssize_t". Every callsite now checks the returned value. Fixes #14013 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-27Merge remote-tracking branch 'arma/task19035-fixedup'Nick Mathewson
2016-05-27Disable GET /tor/bytes.txt and GETINFO dir-usageRoger Dingledine
Remove support for "GET /tor/bytes.txt" DirPort request, and "GETINFO dir-usage" controller request, which were only available via a compile-time option in Tor anyway. Feature was added in 0.2.2.1-alpha. Resolves ticket 19035.
2016-05-17Merge branch 'maint-0.2.8'Nick Mathewson
2016-05-17Merge remote-tracking branch 'arma/bug18616-v4' into maint-0.2.8Nick Mathewson
2016-05-16touchups and refactorings on bug 18616 branchRoger Dingledine
no behavior changes
2016-05-09Merge branch 'feature15588_squashed'Nick Mathewson
2016-05-09Add client auth for ADD_ONION servicesJohn Brooks
2016-05-09Add client auth to rend_service_add_ephemeralJohn Brooks
2016-05-02(cherry-picked by nickm, with changes file from isis.)s0rlxmh0
2016-03-28Fix memory leak in TestingEnableCellStatsEventNick Mathewson
Only when we were actually flushing the cell stats to a controller would we free them. Thus, they could stay in RAM even after the circuit was freed (eg if we didn't have any controllers). Fixes bug 18673; bugfix on 0.2.5.1-alpha.
2016-02-27Update the copyright year.Nick Mathewson
2016-02-17Add onion address to the HS_DESC UPLOADED eventDavid Goulet
Fixes #16023 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2016-01-29Return NULL from extend_info_from_node if the node has no allowed addressteor (Tim Wilson-Brown)
Modify callers to correctly handle these new NULL returns: * fix assert in onion_extend_cpath * warn and discard circuit in circuit_get_open_circ_or_launch * warn, discard circuit, and tell controller in handle_control_extendcircuit
2015-12-15Replace usage of INLINE with inlinecypherpunks
This patch was generated using; sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-11-27More fixes/debugging attempts for 17659Nick Mathewson
2015-11-25Merge branch 'bug17686_v2_027'Nick Mathewson
2015-11-25Now that crypto_rand() cannot fail, it should return void.Nick Mathewson
2015-11-20Add controller getinfo exit-policy/reject-privateteor (Tim Wilson-Brown)
exit-policy/reject-private lists the reject rules added by ExitPolicyRejectPrivate. This makes it easier for stem to display exit policies. Add unit tests for getinfo exit-policy/*. Completes ticket #17183. Patch by "teor".
2015-09-08Separate lookup function for service rend cacheDonncha O'Cearbhaill
Performing lookups in both the client and service side descriptor caches from the same rend_cache_lookup_entry() function increases the risk of accidental API misuse. I'm separating the lookup functions to keep the caches distinct.
2015-09-08Add replica number to HS_DESC CREATED eventDonncha O'Cearbhaill
Including the replica number in the HS_DESC CREATED event provides more context to a control port client. The replica allows clients to more easily identify each replicated descriptor from the independantly output control events.
2015-09-08Specify descriptor cache type in rend_cache_lookup_entry()Donncha O'Cearbhaill
Adds an Enum which represents the different types of rendezvous descriptor caches. This argument is passed in each call to rend_cache_lookup_entry() to specify lookup in the client-side or service-side descriptor caches.
2015-09-08Add GETINFO hs/service/desc/id/ control commandDonncha O'Cearbhaill
Adds a control command to fetch a local service descriptor from the service descriptor cache. The local service descriptor cache is referenced by the onion address of the service. This control command is documented in the control spec.
2015-08-25Add a HS_DESC CREATED control eventDonncha O'Cearbhaill
The HS_DESC CREATED event should be emmited when a new service descriptor is generated for a local rendevous service. This event is documented in the control spec. This commit resolves ticket #16291.
2015-08-25Create a service-side descriptor cacheDonncha O'Cearbhaill
Adds a service descriptor cache which is indexed by service ID. This descriptor cache is used to store service descriptors generated by a local rendevous service. The service-side cach can be queried by calling rend_cache_lookup_entry() with the 'service' argument set to 1.
2015-08-21Merge branch 'workqueue_squashed'Nick Mathewson
2015-08-21Fix a bunch of check-spaces complaintsSebastian Hahn