summaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2017-12-05control: Refactor control_event_hs_descriptor_receive_endDavid Goulet
First, rename and make that function static because it is internal to control.c and called by two HS_DESC events. Second, make it take more basic parameters and thus not a rend_data_t object so we can still use the function for v3 HS that doesn't use that object. Third, move the descriptor ID lookup to the two specific events (yes little code duplication there) because they get a rend_data_t object which won't be the case for v3. Finally, through this refactoring, change the pointer check to BUG() and change some parameter names to reflect what they really are. No behavior change at this commit. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-05control: Refactor HS_DESC events functions to not be v2 specificDavid Goulet
This is a naming refactor mostly _except_ for a the events' function that take a rend_data_t which will require much more refactoring. No behavior change at this commit, cleanup and renaming stuff to not be only v2 specific. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-05hs-v3: Downgrade warning log when an intro circuit has closedDavid Goulet
When an intro circuit has closed, do not warn anymore when we can't find the service. It is possible to hit that condition if the service is removed before the circuits were fully closed. This happens in the case of deleting an ephemeral service. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-05hs-v3: Add ephemeral service supportDavid Goulet
The functions are now used by the ADD_ONION/DEL_ONION control port command as well. This commits makes them fully functionnal with hidden service v3. Part of #20699 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-20hs: Rename rend_service_add_ephemeral_status_tDavid Goulet
Move it to hs_common.h and rename it "hs_service_add_ephemeral_status_t". It will be shared between v2 and v3 services. Part of #20699 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-20control: Support HSv3 interface for ADD_ONIONDavid Goulet
At this commit, the key handling and generation is supported for a v3 service (ED25519-V3). However, the service creation is not yet implemented. This only adds the interface and code to deal with the new ED25519-V3 key type. Tests have been updated for RSA key type but nothing yet for ED25519-v3. Part of #20699 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-20control: Implement GETINFO hs/service/desc/id/<ADDR> for HSv3David Goulet
Part of #20699 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-20hs-v3: Add a lookup service current descriptor functionDavid Goulet
This will be used by the control port command "GETINFO hs/service/desc/id/<ADDR>" which returns the encoded current descriptor for the given onion address. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-20control: Implement GETINFO hs/client/desc/id/<ADDR> for HSv3David Goulet
Part of #20699 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-20hs-v3: Add an encoded descriptor client cache lookup functionDavid Goulet
This commit adds hs_cache_lookup_encoded_as_client() function that returns the encoded descriptor for a given service public key. This will be needed by the "GETINFO hs/client/desc/id/<ADDR>" control port command. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-20Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-20Merge branch 'bug23681_029_01_squashed' into maint-0.3.2Nick Mathewson
2017-11-20circuit: Don't timeout opened C_INTRODUCING circuitDavid Goulet
A circuit with purpose C_INTRODUCING means that its state is opened but the INTRODUCE1 cell hasn't been sent yet. We shouldn't consider that circuit when looking for timing out "building circuit". We have to wait on the rendezvous circuit to be opened before sending that cell so the intro circuit needs to be kept alive for at least that period of time. This patch makes that the purpose C_INTRODUCING is ignored in the circuit_expire_building() which means that we let the circuit idle timeout take care of it if we end up never using it. Fixes #23681 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-18Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-11-18Merge branch 'maint-0.2.5' into maint-0.2.8Nick Mathewson
2017-11-18Move an assertion to make scan-build happy again.Nick Mathewson
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-17Intoduce unittest for skipping outdated dirservers.George Kadianakis
2017-11-17Fix a wide commentNick Mathewson
2017-11-17Merge branch 'bug23817_031' into maint-0.3.2Nick Mathewson
2017-11-17Make should_set_md_dirserver_restriction() look at num filtered guardsNick Mathewson
This seems closer to what the code intended.
2017-11-17Skip dirserver restrictions in small networks.George Kadianakis
2017-11-17Introduce new guard restriction and use it to skip outdated dirs.George Kadianakis
2017-11-17Introduce cache for outdated microdesc dirservers.George Kadianakis
We gonna use this cache to avoid dirservers without outdated md info.
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-17Only log about lost KIST support onceMatt Traudt
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-17Merge remote-tracking branch 'dgoulet/bug23861_032_01' into maint-0.3.2Nick Mathewson
2017-11-17Add error message for exit_node in hs_circ_send_introduce1()Neel Chauhan
2017-11-17Use memset() on intro1_data in hs_circ_send_introduce1()Neel Chauhan
2017-11-17Add smartlist_add() to get_lspecs_from_node)Neel Chauhan
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-17Merge branch 'bug24167_025' into maint-0.3.2Nick Mathewson
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-17Merge branch 'ticket24097_032' into maint-0.3.2Nick Mathewson
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-16Fix a traceback when closing a blocked connection "immediately".Nick Mathewson
When we close a connection via connection_close_immediately, we kill its events immediately. But if it had been blocked on bandwidth read/write, we could try to re-add its (nonexistent) events later from connection_bucket_refill -- if we got to that callback before we swept the marked connections. Fixes bug 24167. Fortunately, this hasn't been a crash bug since we introduced connection_check_event in 0.2.9.10, and backported it. This is a bugfix on commit 89d422914a0c3cb, I believe, which appeared in Tor 0.1.0.1-rc.
2017-11-16relay: Avoid extra LOG_NOTICE for every new descriptor batchDavid Goulet
Commit 56c5e282a733912776f6dacbe4f5df66b4fb9606 suppressed that same log statement in directory_info_has_arrived() for microdescriptors so do the same for the descriptors. As the commit says, we already have the bootstrap progress for this. Fixes #23861 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-16Downgrade evdns warnings about weird replies.Nick Mathewson
evdns is allowed to give us unrecognized object types; it is allowed to give us non-IPv4 answer types, and it is (even) allowed to give us empty answers without an error. Closes ticket 24097.
2017-11-15Tweak the message when we re-enable CBT.Nick Mathewson
Implements ticket 20963.
2017-11-15Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-15Merge remote-tracking branch 'asn/bug23662_032' into maint-0.3.2Nick Mathewson
2017-11-14Remove remove_file_if_very_old() -- nothing calls it.Nick Mathewson
2017-11-14Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-14Merge remote-tracking branch 'dgoulet/bug24230_032_01' into maint-0.3.2Nick Mathewson
2017-11-14Silence a warning about failed descriptor uploads.George Kadianakis
Due to #23662 this can happen under natural causes and does not disturb the functionality of the service. This is a simple 0.3.2 fix for now, and we plan to fix this properly in 0.3.3.
2017-11-13Minimal implementation of bridge-distribution-requestNick Mathewson
Just advertise the line when we're a bridge, using "any" if we're published or "none" if we aren't. This is done in lieu of a full backport of #18329.
2017-11-13Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-13Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2017-11-13hs-v3: Fix consensus param "hsdir-interval" nameDavid Goulet
The dir-spec.txt specifies it to be "hsdir_interval" (underscore). Fixes #24262 Signed-off-by: David Goulet <dgoulet@torproject.org>