aboutsummaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2018-11-07Make the hibernate.c changes for systemd compile.Nick Mathewson
2018-11-06Merge remote-tracking branch 'tor-github/pr/474' into maint-0.3.5Nick Mathewson
2018-10-30Merge branch 'tor-github/pr/438' into maint-0.3.5David Goulet
2018-10-30Merge branch 'tor-github/pr/415' into maint-0.3.5David Goulet
2018-10-30Detect the onion service version and then check for invalid options unless ↵Neel Chauhan
we have set HiddenServiceVersion
2018-10-25Merge branch 'bug28202_033' into bug28202_035Nick Mathewson
2018-10-23Documentation: Move the hs_service_descriptor_t elements around.George Kadianakis
Move the elements around to concentrate mutable and immutable elements together. This commit changes no code, check with --color-moved.
2018-10-23Documentation: Document which descriptor elements are (im)mutable.George Kadianakis
2018-10-23Func rename: Make it clear that update_all_descriptors() does intro points.George Kadianakis
With the new refresh_service_descriptor() function we had both refresh_service_descriptor() and update_service_descriptor() which is basically the same thing. This commit renames update_service_descriptor() to update_service_descriptor_intro_points() to make it clear it's not a generic refresh and it's only about intro points. Commit changes no code.
2018-10-22hs-v3: Create desc signing key cert before uploadingDavid Goulet
Before this commit, we would create the descriptor signing key certificate when first building the descriptor. In some extreme cases, it lead to the expiry of the certificate which triggers a BUG() when encoding the descriptor before uploading. Ticket #27838 details a possible scenario in which this can happen. It is an edge case where tor losts internet connectivity, notices it and closes all circuits. When it came back up, the HS subsystem noticed that it had no introduction circuits, created them and tried to upload the descriptor. However, in the meantime, if tor did lack a live consensus because it is currently seeking to download one, we would consider that we don't need to rotate the descriptors leading to using the expired signing key certificate. That being said, this commit does a bit more to make this process cleaner. There are a series of things that we need to "refresh" before uploading a descriptor: signing key cert, intro points and revision counter. A refresh function is added to deal with all mutable descriptor fields. It in turn simplified a bit the code surrounding the creation of the plaintext data. We keep creating the cert when building the descriptor in order to accomodate the unit tests. However, it is replaced every single time the descriptor is uploaded. Fixes #27838 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-18hs-v3: Always generate the descriptor cookieDavid Goulet
It won't be used if there are no authorized client configured. We do that so we can easily support the addition of a client with a HUP signal which allow us to avoid more complex code path to generate that cookie if we have at least one client auth and we had none before. Fixes #27995 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-10-17Merge branch 'bug27800-034' into bug27800-035Taylor Yu
2018-10-17merge in some fixes i found in a sandboxRoger Dingledine
2018-10-16Fix typo in comment for hs_cell_parse_introduce2()Neel Chauhan
2018-10-15Merge branch 'maint-0.3.4'Nick Mathewson
2018-10-15Merge branch 'maint-0.3.4'Nick Mathewson
2018-10-14Remove a double-newline and improve a commentNick Mathewson
2018-10-14Merge branch 'bug27772_squashed'Nick Mathewson
2018-10-12Merge remote-tracking branch 'tor-github/pr/380'Nick Mathewson
2018-10-05Add newline between hs_client_get_random_intro_from_edge() and ↵Neel Chauhan
hs_client_receive_introduce_ack()
2018-10-01Merge remote-tracking branch 'public/bug27893'Nick Mathewson
2018-10-01Fix a bug where we would crash on --version.Nick Mathewson
Bug not in any released Tor. test-stem would have caught this.
2018-10-01Remove routerparse include from files that dont use itNick Mathewson
2018-10-01Remove versions.h include from routerparse.hNick Mathewson
2018-10-01Remove unused headers from routerparse.cNick Mathewson
2018-10-01Extract addr-policy parsing code.Nick Mathewson
2018-10-01Move summarize_protover_flags to versions.cNick Mathewson
2018-10-01extract networkstatus parsing to its own file.Nick Mathewson
2018-10-01Pull detached-signatures code into dirauth.Nick Mathewson
2018-10-01Split microdescriptor parser into its own file.Nick Mathewson
2018-10-01Remove addr_policy_assert_ok() as unusedNick Mathewson
2018-10-01Remove dump_distinct_digest_count()Nick Mathewson
It was disabled-by-default for ages, and it no longer compiles. I think it's safe to call it obsolete.
2018-10-01Remove router_get_dir_hash as unused.Nick Mathewson
2018-10-01Move v2 hs parsing into feature/rendNick Mathewson
2018-10-01Split the authority-cert and signature/hash code from routerparseNick Mathewson
2018-10-01Extract the version-managing code from routerparse.cNick Mathewson
Leave the versions.h include in routerparse.h for now; I'll remove it later.
2018-10-01Extract logic for dumping unparseable junk from routerparse.cNick Mathewson
2018-10-01Move routerparse and parsecommon to their own module.Nick Mathewson
2018-09-27Detect an unlikely integer overflow.Nick Mathewson
2018-09-27Fix a memory leak in --dump-configNick Mathewson
When freeing a configuration object from confparse.c in dump_config(), we need to call the appropriate higher-level free function (like or_options_free()) and not just config_free(). This only happens with options (since they're the one where options_validate allocates extra stuff) and only when running --dump-config with something other than minimal (since OPTIONS_DUMP_MINIMAL doesn't hit this code). Fixes bug 27893; bugfix on 0.3.2.1-alpha.
2018-09-27Mark a variable static.Nick Mathewson
2018-09-27Extract the non-stats part of geoip into a new src/lib/geoip.Nick Mathewson
2018-09-27Remove excess dependencies from geoip.cNick Mathewson
2018-09-27Split geoip from geoip-related stats.Nick Mathewson
This commit just moves the code to two separate files. The geoip code still has a few needless dependencies on core/* and features/*.
2018-09-27Move the n_v3_ns_requests field out of geoip_country_tNick Mathewson
This is preparation for splitting geoip.c into stats and non-stats portions.
2018-09-27Move the predicted ports code out of rephist.cNick Mathewson
It differs from the rest of the rephist code in that it's actually necessary for Tor to operate, so it should probably go somewhere else. I'm not sure where yet, so I'll leave it in the same directory, but give it its own file.
2018-09-26Merge branch 'router_split'Nick Mathewson
2018-09-26Merge remote-tracking branch 'dgoulet/bug27550_035_01'Nick Mathewson
2018-09-25Remove extra includes from router.cNick Mathewson
2018-09-25Revise things that had included router.h beforeNick Mathewson
Make them only include the headers that they needed, and sort their headers while we're at it.