From 702a86183ffb2a42a23cb12b13835ad4e4e58f54 Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Tue, 27 Mar 2012 14:04:52 +0000 Subject: [PATCH] -lots of fixes, new dht test --- src/gns/Makefile.am | 25 +- src/gns/gnunet-service-gns_interceptor.c | 20 +- src/gns/gnunet-service-gns_resolver.c | 207 ++++++------ src/gns/gnunet-service-gns_resolver.h | 5 + src/gns/plugin_block_gns.c | 9 +- src/gns/test_gns_defaults.conf | 75 +++++ src/gns/test_gns_dht_alice.conf | 92 ++++++ src/gns/test_gns_dht_bob.conf | 92 ++++++ src/gns/test_gns_dht_dave.conf | 92 ++++++ ...gns_twopeer.c => test_gns_dht_threepeer.c} | 298 +++++++----------- src/gns/testdb/sqlite-alice.db | Bin 0 -> 13312 bytes src/gns/testdb/sqlite-alice.db.bak | Bin 0 -> 13312 bytes src/gns/testdb/sqlite-bob.db | Bin 0 -> 14336 bytes src/gns/testdb/sqlite-dave.db | Bin 0 -> 17408 bytes ...6S8QRSGBBLMA8377HL6F60TEMO7S7TT1OR8CG.zkey | Bin 0 -> 914 bytes ...KL8SFPEUMORFPP9ERE6AC98KO9NADBMPF7TOG.zkey | Bin 0 -> 914 bytes ...BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey | Bin 0 -> 914 bytes 17 files changed, 622 insertions(+), 293 deletions(-) create mode 100644 src/gns/test_gns_defaults.conf create mode 100644 src/gns/test_gns_dht_alice.conf create mode 100644 src/gns/test_gns_dht_bob.conf create mode 100644 src/gns/test_gns_dht_dave.conf rename src/gns/{test_gns_twopeer.c => test_gns_dht_threepeer.c} (60%) create mode 100644 src/gns/testdb/sqlite-alice.db create mode 100644 src/gns/testdb/sqlite-alice.db.bak create mode 100644 src/gns/testdb/sqlite-bob.db create mode 100644 src/gns/testdb/sqlite-dave.db create mode 100644 src/gns/testkeys/KAILNI4SSH8M6QR6S8QRSGBBLMA8377HL6F60TEMO7S7TT1OR8CG.zkey create mode 100644 src/gns/testkeys/KRPVFMVBFKEGUS6KL8SFPEUMORFPP9ERE6AC98KO9NADBMPF7TOG.zkey create mode 100644 src/gns/testkeys/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 2b62cec53..cbf4a02bb 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am @@ -39,7 +39,8 @@ check_PROGRAMS = \ test_gns_simple_zkey_lookup \ test_gns_dht_delegated_lookup \ test_gns_pseu_shorten \ - test_gns_max_queries + test_gns_max_queries \ + test_gns_dht_threepeer # test_gns_simple_lookup @@ -50,16 +51,18 @@ check_PROGRAMS = \ plugin_LTLIBRARIES = \ libgnunet_plugin_block_gns.la -#test_gns_twopeer_SOURCES = \ -# test_gns_twopeer.c -#test_gns_twopeer_LDADD = \ -# $(top_builddir)/src/util/libgnunetutil.la \ -# $(top_builddir)/src/namestore/libgnunetnamestore.la \ -# $(top_builddir)/src/testing/libgnunettesting.la -#test_gns_twopeer_DEPENDENCIES = \ -# $(top_builddir)/src/util/libgnunetutil.la \ -# $(top_builddir)/src/namestore/libgnunetnamestore.la \ -# $(top_builddir)/src/testing/libgnunettesting.la +test_gns_dht_threepeer_SOURCES = \ + test_gns_dht_threepeer.c +test_gns_dht_threepeer_LDADD = \ + $(top_builddir)/src/util/libgnunetutil.la \ + $(top_builddir)/src/namestore/libgnunetnamestore.la \ + $(top_builddir)/src/gns/libgnunetgns.la \ + $(top_builddir)/src/testing/libgnunettesting.la +test_gns_dht_threepeer_DEPENDENCIES = \ + $(top_builddir)/src/util/libgnunetutil.la \ + $(top_builddir)/src/namestore/libgnunetnamestore.la \ + $(top_builddir)/src/gns/libgnunetgns.la \ + $(top_builddir)/src/testing/libgnunettesting.la test_gns_simple_lookup_SOURCES = \ test_gns_simple_lookup.c diff --git a/src/gns/gnunet-service-gns_interceptor.c b/src/gns/gnunet-service-gns_interceptor.c index ca46fa1ae..b3ecdfdf9 100644 --- a/src/gns/gnunet-service-gns_interceptor.c +++ b/src/gns/gnunet-service-gns_interceptor.c @@ -66,6 +66,11 @@ static struct GNUNET_CRYPTO_ShortHashCode our_zone; */ static struct GNUNET_CRYPTO_RsaPrivateKey *our_key; +/** + * Default timeout + */ +static struct GNUNET_TIME_Relative default_lookup_timeout; + /** * Reply to dns request with the result from our lookup. * @@ -240,7 +245,7 @@ start_resolution_for_dns(struct GNUNET_DNS_RequestHandle *request, /* Start resolution in our zone */ gns_resolver_lookup_record(our_zone, q->type, q->name, our_key, - GNUNET_GNS_DEFAULT_LOOKUP_TIMEOUT, + default_lookup_timeout, &reply_to_dns, ilh); } @@ -341,6 +346,8 @@ gns_interceptor_init(struct GNUNET_CRYPTO_ShortHashCode zone, struct GNUNET_CRYPTO_RsaPrivateKey *key, const struct GNUNET_CONFIGURATION_Handle *c) { + unsigned long long default_lookup_timeout_secs = 0; + GNUNET_log(GNUNET_ERROR_TYPE_INFO, "DNS hijacking enabled... connecting to service.\n"); @@ -353,6 +360,17 @@ gns_interceptor_init(struct GNUNET_CRYPTO_ShortHashCode zone, GNUNET_DNS_FLAG_PRE_RESOLUTION, &handle_dns_request, /* rh */ NULL); /* Closure */ + + if (GNUNET_OK == + GNUNET_CONFIGURATION_get_value_number(c, "gns", + "DEFAULT_LOOKUP_TIMEOUT", + &default_lookup_timeout_secs)) + { + default_lookup_timeout = GNUNET_TIME_relative_multiply( + GNUNET_TIME_UNIT_SECONDS, + default_lookup_timeout_secs); + } + if (NULL == dns_handle) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index ae01dafa9..de6e9ccc3 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c @@ -69,6 +69,8 @@ static unsigned long long max_allowed_background_queries; */ static struct GNUNET_CRYPTO_ShortHashCode local_zone; +static unsigned long long rid = 0; + /** * Namestore calls this function if we have record for this name. * (or with rd_count=0 to indicate no matches) @@ -470,8 +472,8 @@ cleanup_pending_background_queries(void* cls, ResolverCleanupContinuation cont = cls; GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_CLEANUP: Terminating background lookup for %s\n", - rh->name); + "GNS_CLEANUP-%d: Terminating background lookup for %s\n", + rh->id, rh->name); GNUNET_DHT_get_stop(rh->get_handle); rh->get_handle = NULL; rh->proc(rh->proc_cls, rh, 0, NULL); @@ -601,8 +603,8 @@ dht_lookup_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) char new_name[MAX_DNS_NAME_LENGTH]; GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: dht lookup for query %s timed out.\n", - rh->name); + "GNS_PHASE_REC-%d: dht lookup for query %s (%ds)timed out.\n", + rh->id, rh->name, rh->timeout.rel_value); /** * Start resolution in bg */ @@ -612,8 +614,8 @@ dht_lookup_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) rh->name, GNUNET_GNS_TLD); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Starting background lookup for %s type %d\n", - new_name, rlh->record_type); + "GNS_PHASE_REC-%d: Starting background lookup for %s type %d\n", + rh->id, new_name, rlh->record_type); gns_resolver_lookup_record(rh->authority, rlh->record_type, @@ -664,16 +666,17 @@ process_record_result_dht(void* cls, char* rd_data = (char*)data; int i; int rd_size; - + + rh = (struct ResolverHandle *)cls; GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: got dht result (size=%d)\n", size); + "GNS_PHASE_REC-%d: got dht result (size=%d)\n", rh->id, size); if (data == NULL) return; //FIXME maybe check expiration here, check block type - rh = (struct ResolverHandle *)cls; + rlh = (struct RecordLookupHandle *) rh->proc_cls; nrb = (struct GNSNameRecordBlock*)data; @@ -707,21 +710,25 @@ process_record_result_dht(void* cls, num_records, rd)) { - GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Error deserializing data!\n"); + GNUNET_log(GNUNET_ERROR_TYPE_ERROR, + "GNS_PHASE_REC-%d: Error deserializing data!\n", rh->id); return; } for (i=0; iname); + "GNS_PHASE_REC-%d: Got name: %s (wanted %s)\n", + rh->id, name, rh->name); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Got type: %d\n", - rd[i].record_type); + "GNS_PHASE_REC-%d: Got type: %d\n", + rh->id, rd[i].record_type); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Got data length: %d\n", rd[i].data_size); + "GNS_PHASE_REC-%d: Got data length: %d\n", + rh->id, rd[i].data_size); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Got flag %d\n", rd[i].flags); + "GNS_PHASE_REC-%d: Got flag %d\n", + rh->id, rd[i].flags); if ((strcmp(name, rh->name) == 0) && (rd[i].record_type == rlh->record_type)) @@ -782,8 +789,8 @@ resolve_record_dht(struct ResolverHandle *rh) GNUNET_CRYPTO_hash_to_enc (&lookup_key, &lookup_key_string); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: starting dht lookup for %s with key: %s\n", - rh->name, (char*)&lookup_key_string); + "GNS_PHASE_REC-%d: starting dht lookup for %s with key: %s\n", + rh->id, rh->name, (char*)&lookup_key_string); //rh->timeout_task = GNUNET_SCHEDULER_NO_TASK; rh->dht_heap_node = NULL; @@ -797,7 +804,7 @@ resolve_record_dht(struct ResolverHandle *rh) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Adjusting timeout\n"); + "GNS_PHASE_REC-%d: Adjusting timeout\n", rh->id); /* * Set timeout for authority lookup phase to 1/2 */ @@ -823,8 +830,8 @@ resolve_record_dht(struct ResolverHandle *rh) rh_heap_root->dht_heap_node = NULL; GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Replacing oldest background query for %s\n", - rh_heap_root->name); + "GNS_PHASE_REC-%d: Replacing oldest background query for %s\n", + rh->id, rh_heap_root->name); rh_heap_root->proc(rh_heap_root->proc_cls, rh_heap_root, 0, @@ -904,12 +911,12 @@ process_record_result_ns(void* cls, * Lookup terminated and no results */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Namestore lookup for %s terminated without results\n", - name); + "GNS_PHASE_REC-%d: Namestore lookup for %s terminated without results\n", + rh->id, name); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Record %s unknown in namestore\n", - rh->name); + "GNS_PHASE_REC-%d: Record %s unknown in namestore\n", + rh->id, rh->name); /** * Our zone and no result? Cannot resolve TT */ @@ -921,8 +928,8 @@ process_record_result_ns(void* cls, { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Processing additional result %s from namestore\n", - name); + "GNS_PHASE_REC-%d: Processing additional result %s from namestore\n", + rh->id, name); int i; for (i=0; iid); continue; } @@ -948,14 +956,14 @@ process_record_result_ns(void* cls, if (rh->answered == 0) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: No answers found. This is odd!\n"); + "GNS_PHASE_REC-%d: No answers found. This is odd!\n", rh->id); rh->proc(rh->proc_cls, rh, 0, NULL); return; } GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Found %d answer(s) to query in %d records!\n", - rh->answered, rd_count); + "GNS_PHASE_REC-%d: Found %d answer(s) to query in %d records!\n", + rh->id, rh->answered, rd_count); rh->proc(rh->proc_cls, rh, rd_count, rd); } @@ -1012,8 +1020,8 @@ dht_authority_lookup_timeout(void *cls, char new_name[MAX_DNS_NAME_LENGTH]; GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: dht lookup for query %s timed out.\n", - rh->authority_name); + "GNS_PHASE_DELEGATE_DHT-%d: dht lookup for query %s (%ds)timed out.\n", + rh->id, rh->authority_name, rh->timeout.rel_value); rh->status |= TIMED_OUT; @@ -1044,8 +1052,8 @@ dht_authority_lookup_timeout(void *cls, strcpy(rh->name, new_name); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Starting background query for %s type %d\n", - rh->name, rlh->record_type); + "GNS_PHASE_DELEGATE_DHT-%d: Starting background query for %s type %d\n", + rh->id, rh->name, rlh->record_type); gns_resolver_lookup_record(rh->authority, rlh->record_type, @@ -1115,16 +1123,15 @@ process_delegation_result_dht(void* cls, int rd_size; struct GNUNET_CRYPTO_ShortHashCode zone, name_hash; GNUNET_HashCode zone_hash_double, name_hash_double; + + rh = (struct ResolverHandle *)cls; GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Got DHT result\n"); + "GNS_PHASE_DELEGATE_DHT-%d: Got DHT result\n", rh->id); if (data == NULL) return; - //FIXME check expiration? - - rh = (struct ResolverHandle *)cls; nrb = (struct GNSNameRecordBlock*)data; /* stop dht lookup and timeout task */ @@ -1152,33 +1159,36 @@ process_delegation_result_dht(void* cls, rd)) { GNUNET_log(GNUNET_ERROR_TYPE_ERROR, - "GNS_PHASE_DELEGATE_DHT: Error deserializing data!\n"); + "GNS_PHASE_DELEGATE_DHT-%d: Error deserializing data!\n", + rh->id); return; } GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Got name: %s (wanted %s)\n", - name, rh->authority_name); + "GNS_PHASE_DELEGATE_DHT-%d: Got name: %s (wanted %s)\n", + rh->id, name, rh->authority_name); for (i=0; iauthority_name); + "GNS_PHASE_DELEGATE_DHT-%d: Got name: %s (wanted %s)\n", + rh->id, name, rh->authority_name); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Got type: %d (wanted %d)\n", - rd[i].record_type, GNUNET_GNS_RECORD_PKEY); + "GNS_PHASE_DELEGATE_DHT-%d: Got type: %d (wanted %d)\n", + rh->id, rd[i].record_type, GNUNET_GNS_RECORD_PKEY); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Got data length: %d\n", - rd[i].data_size); + "GNS_PHASE_DELEGATE_DHT-%d: Got data length: %d\n", + rh->id, rd[i].data_size); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Got flag %d\n", rd[i].flags); + "GNS_PHASE_DELEGATE_DHT-%d: Got flag %d\n", + rh->id, rd[i].flags); if ((strcmp(name, rh->authority_name) == 0) && (rd[i].record_type == GNUNET_GNS_RECORD_PKEY)) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Authority found in DHT\n"); + "GNS_PHASE_DELEGATE_DHT-%d: Authority found in DHT\n", + rh->id); rh->answered = 1; memcpy(&rh->authority, rd[i].data, sizeof(struct GNUNET_CRYPTO_ShortHashCode)); struct AuthorityChain *auth = @@ -1229,8 +1239,8 @@ process_delegation_result_dht(void* cls, * FIXME in this case. should we ask namestore again? */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Answer from DHT for %s. Yet to resolve: %s\n", - rh->authority_name, rh->name); + "GNS_PHASE_DELEGATE_DHT-%d: Answer from DHT for %s. Yet to resolve: %s\n", + rh->id, rh->authority_name, rh->name); if (strcmp(rh->name, "") == 0) { rh->proc(rh->proc_cls, rh, 0, NULL); @@ -1248,8 +1258,8 @@ process_delegation_result_dht(void* cls, * promote back */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Adding %s back to %s\n", - rh->authority_name, rh->name); + "GNS_PHASE_DELEGATE_DHT-%d: Adding %s back to %s\n", + rh->id, rh->authority_name, rh->name); if (strcmp(rh->name, "") == 0) strcpy(rh->name, rh->authority_name); else @@ -1257,9 +1267,10 @@ process_delegation_result_dht(void* cls, rh->name, rh->authority_name); //FIXME ret GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: %s restored\n", rh->name); + "GNS_PHASE_DELEGATE_DHT-%d: %s restored\n", rh->id, rh->name); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: DHT authority lookup found no match!\n"); + "GNS_PHASE_DELEGATE_DHT-%d: DHT authority lookup found no match!\n", + rh->id); rh->proc(rh->proc_cls, rh, 0, NULL); } @@ -1416,8 +1427,8 @@ handle_record_dht(void* cls, struct ResolverHandle *rh, if (rd_count == 0) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: No records for %s found in DHT. Aborting\n", - rh->name); + "GNS_PHASE_REC-%d: No records for %s found in DHT. Aborting\n", + rh->id, rh->name); /* give up, cannot resolve */ finish_lookup(rh, rlh, 0, NULL); free_resolver_handle(rh); @@ -1426,7 +1437,7 @@ handle_record_dht(void* cls, struct ResolverHandle *rh, /* results found yay */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Record resolved from DHT!"); + "GNS_PHASE_REC-%d: Record resolved from DHT!", rh->id); finish_lookup(rh, rlh, rd_count, rd); free_resolver_handle(rh); @@ -1452,7 +1463,8 @@ handle_record_ns(void* cls, struct ResolverHandle *rh, if (rd_count == 0) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: NS returned no records. (status: %d)!\n", + "GNS_PHASE_REC-%d: NS returned no records. (status: %d)!\n", + rh->id, rh->status); /** @@ -1482,7 +1494,7 @@ handle_record_ns(void* cls, struct ResolverHandle *rh, /* results found yay */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_REC: Record resolved from namestore!"); + "GNS_PHASE_REC-%d: Record resolved from namestore!", rh->id); finish_lookup(rh, rlh, rd_count, rd); @@ -1568,7 +1580,7 @@ is_tld(const char* name, const char* tld) offset = strlen(name)-strlen(tld); if (strcmp(name+offset, tld) != 0) { - GNUNET_log(GNUNET_ERROR_TYPE_INFO, + GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s is not in .%s TLD\n", name, tld); return GNUNET_NO; } @@ -1597,14 +1609,16 @@ handle_delegation_dht(void* cls, struct ResolverHandle *rh, if ((rlh->record_type == GNUNET_GNS_RECORD_PKEY)) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Resolved queried PKEY via DHT.\n"); + "GNS_PHASE_DELEGATE_DHT-%d: Resolved queried PKEY via DHT.\n", + rh->id); finish_lookup(rh, rlh, rd_count, rd); free_resolver_handle(rh); return; } /* We resolved full name for delegation. resolving record */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Resolved full name for delegation via DHT.\n"); + "GNS_PHASE_DELEGATE_DHT-%d: Resolved full name for delegation via DHT.\n", + rh->id); strcpy(rh->name, "+\0"); rh->proc = &handle_record_ns; resolve_record_ns(rh); @@ -1617,16 +1631,17 @@ handle_delegation_dht(void* cls, struct ResolverHandle *rh, if (is_canonical(rh->name)) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Resolving canonical record %s in ns\n", - rh->name); + "GNS_PHASE_DELEGATE_DHT-%d: Resolving canonical record %s in ns\n", + rh->id, + rh->name); rh->proc = &handle_record_ns; resolve_record_ns(rh); return; } /* give up, cannot resolve */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Cannot fully resolve delegation for %s via DHT!\n", - rh->name); + "GNS_PHASE_DELEGATE_DHT-%d: Cannot fully resolve delegation for %s via DHT!\n", + rh->id, rh->name); finish_lookup(rh, rlh, 0, NULL); free_resolver_handle(rh); } @@ -1677,8 +1692,8 @@ resolve_delegation_dht(struct ResolverHandle *rh) rh_heap_root->dht_heap_node = NULL; GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_DHT: Replacing oldest background query for %s\n", - rh_heap_root->authority_name); + "GNS_PHASE_DELEGATE_DHT-%d: Replacing oldest background query for %s\n", + rh->id, rh_heap_root->authority_name); rh_heap_root->proc(rh_heap_root->proc_cls, rh_heap_root, @@ -1729,14 +1744,16 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh, { GNUNET_assert(rd_count == 1); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Resolved queried PKEY in NS.\n"); + "GNS_PHASE_DELEGATE_NS-%d: Resolved queried PKEY in NS.\n", + rh->id); finish_lookup(rh, rlh, rd_count, rd); free_resolver_handle(rh); return; } /* We resolved full name for delegation. resolving record */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Resolved full name for delegation.\n"); + "GNS_PHASE_DELEGATE_NS-%d: Resolved full name for delegation.\n", + rh->id); strcpy(rh->name, "+\0"); rh->proc = &handle_record_ns; resolve_record_ns(rh); @@ -1756,7 +1773,8 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh, if (is_canonical(rh->name)) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Resolving canonical record %s\n", + "GNS_PHASE_DELEGATE_NS-%d: Resolving canonical record %s\n", + rh->id, rh->name); rh->proc = &handle_record_ns; resolve_record_ns(rh); @@ -1765,8 +1783,9 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh, { /* give up, cannot resolve */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Cannot fully resolve delegation for %s!\n", - rh->name); + "GNS_PHASE_DELEGATE_NS-%d: Cannot fully resolve delegation for %s!\n", + rh->id, + rh->name); finish_lookup(rh, rlh, rd_count, rd); //rlh->proc(rlh->proc_cls, 0, NULL); } @@ -1774,8 +1793,8 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh, } GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Trying to resolve delegation for %s via DHT\n", - rh->name); + "GNS_PHASE_DELEGATE_NS-%d: Trying to resolve delegation for %s via DHT\n", + rh->id, rh->name); rh->proc = &handle_delegation_dht; resolve_delegation_dht(rh); } @@ -1809,12 +1828,12 @@ process_delegation_result_ns(void* cls, struct GNUNET_TIME_Relative remaining_time; struct GNUNET_CRYPTO_ShortHashCode zone; char new_name[MAX_DNS_NAME_LENGTH]; - + + rh = (struct ResolverHandle *)cls; GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Got %d records from authority lookup\n", - rd_count); + "GNS_PHASE_DELEGATE_NS-%d: Got %d records from authority lookup\n", + rh->id, rd_count); - rh = (struct ResolverHandle *)cls; GNUNET_CRYPTO_short_hash(key, sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), &zone); @@ -1850,16 +1869,16 @@ process_delegation_result_ns(void* cls, { /* simply promote back */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Promoting %s back to name\n", - rh->authority_name); + "GNS_PHASE_DELEGATE_NS-%d: Promoting %s back to name\n", + rh->id, rh->authority_name); strcpy(rh->name, rh->authority_name); } else { /* add back to existing name */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Adding %s back to %s\n", - rh->authority_name, rh->name); + "GNS_PHASE_DELEGATE_NS-%d: Adding %s back to %s\n", + rh->id, rh->authority_name, rh->name); //memset(new_name, 0, strlen(rh->name) + strlen(rh->authority_name) + 2); GNUNET_snprintf(new_name, MAX_DNS_NAME_LENGTH, "%s.%s", rh->name, rh->authority_name); @@ -1868,7 +1887,7 @@ process_delegation_result_ns(void* cls, //strcpy(new_name+strlen(new_name), rh->authority_name); strcpy(rh->name, new_name); GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: %s restored\n", rh->name); + "GNS_PHASE_DELEGATE_NS-%d: %s restored\n", rh->id, rh->name); } rh->proc(rh->proc_cls, rh, 0, NULL); return; @@ -1890,11 +1909,13 @@ process_delegation_result_ns(void* cls, == 0) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: This pkey is expired.\n"); + "GNS_PHASE_DELEGATE_NS-%d: This pkey is expired.\n", + rh->id); if (remaining_time.rel_value == 0) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: This dht entry is expired.\n"); + "GNS_PHASE_DELEGATE_NS-%d: This dht entry is expired.\n", + rh->id); rh->authority_chain_head->fresh = 0; rh->proc(rh->proc_cls, rh, 0, NULL); return; @@ -1937,7 +1958,7 @@ process_delegation_result_ns(void* cls, * no answers found */ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Authority lookup and no PKEY...\n"); + "GNS_PHASE_DELEGATE_NS-%d: Authority lookup and no PKEY...\n", rh->id); rh->proc(rh->proc_cls, rh, 0, NULL); } @@ -1951,7 +1972,8 @@ static void resolve_delegation_ns(struct ResolverHandle *rh) { GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "GNS_PHASE_DELEGATE_NS: Resolving delegation for %s\n", rh->name); + "GNS_PHASE_DELEGATE_NS-%d: Resolving delegation for %s\n", + rh->id, rh->name); pop_tld(rh->name, rh->authority_name); GNUNET_NAMESTORE_lookup_record(namestore_handle, &rh->authority, @@ -2007,6 +2029,7 @@ gns_resolver_lookup_record(struct GNUNET_CRYPTO_ShortHashCode zone, rh = GNUNET_malloc(sizeof (struct ResolverHandle)); rh->authority = zone; + rh->id = rid++; rh->proc_cls = rlh; rh->priv_key = key; rh->timeout = timeout; @@ -2016,6 +2039,8 @@ gns_resolver_lookup_record(struct GNUNET_CRYPTO_ShortHashCode zone, /* * Set timeout for authority lookup phase to 1/2 */ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Timeout for lookup set to %ds\n", rh->timeout.rel_value); rh->timeout_task = GNUNET_SCHEDULER_add_delayed( GNUNET_TIME_relative_divide(timeout, 2), &handle_lookup_timeout, @@ -2299,6 +2324,7 @@ handle_delegation_ns_shorten(void* cls, { rh_bg = GNUNET_malloc(sizeof(struct ResolverHandle)); memcpy(rh_bg, rh, sizeof(struct ResolverHandle)); + rh_bg->id = rid++; } /* backtrack authorities for names */ @@ -2448,9 +2474,11 @@ gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone, rh = GNUNET_malloc(sizeof (struct ResolverHandle)); rh->authority = zone; + rh->id = rid++; rh->priv_key = key; rh->proc = &handle_delegation_ns_shorten; rh->proc_cls = nsh; + rh->id = rid++; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Checking for TLD...\n"); @@ -2615,6 +2643,7 @@ gns_resolver_get_authority(struct GNUNET_CRYPTO_ShortHashCode zone, nah = GNUNET_malloc(sizeof (struct GetNameAuthorityHandle)); rh = GNUNET_malloc(sizeof (struct ResolverHandle)); rh->authority = zone; + rh->id = rid++; if (strcmp(GNUNET_GNS_TLD, name) == 0) { diff --git a/src/gns/gnunet-service-gns_resolver.h b/src/gns/gnunet-service-gns_resolver.h index 85c21e324..2da9bff1d 100644 --- a/src/gns/gnunet-service-gns_resolver.h +++ b/src/gns/gnunet-service-gns_resolver.h @@ -160,6 +160,11 @@ struct ResolverHandle */ struct GNUNET_CONTAINER_HeapNode *dht_heap_node; + /** + * Id for resolution process + */ + unsigned long long id; + }; diff --git a/src/gns/plugin_block_gns.c b/src/gns/plugin_block_gns.c index 7dfaab0fa..46ce1249d 100644 --- a/src/gns/plugin_block_gns.c +++ b/src/gns/plugin_block_gns.c @@ -77,7 +77,7 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, uint32_t record_xquery; unsigned int record_match; - GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "RB SIZE %d\n", reply_block_size); + //GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "RB SIZE %d\n", reply_block_size); if (type != GNUNET_BLOCK_TYPE_GNS_NAMERECORD) return GNUNET_BLOCK_EVALUATION_TYPE_NOT_SUPPORTED; @@ -113,9 +113,9 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, GNUNET_CRYPTO_hash_to_enc (&query_key, &xor_exp); GNUNET_CRYPTO_hash_to_enc (query, &xor_got); - GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, - "BLOCK_TEST for %s got %s expected %s\n", - name, (char*) &xor_got, (char*) &xor_exp); + //GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, + // "BLOCK_TEST for %s got %s expected %s\n", + // name, (char*) &xor_got, (char*) &xor_exp); /* Check query key against public key */ if (0 != GNUNET_CRYPTO_hash_cmp(query, &query_key)) @@ -184,7 +184,6 @@ block_plugin_gns_evaluate (void *cls, enum GNUNET_BLOCK_Type type, GNUNET_BLOCK_mingle_hash(&chash, bf_mutator, &mhash); if (NULL != *bf) { - GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Check BF\n"); if (GNUNET_YES == GNUNET_CONTAINER_bloomfilter_test(*bf, &mhash)) return GNUNET_BLOCK_EVALUATION_OK_DUPLICATE; } diff --git a/src/gns/test_gns_defaults.conf b/src/gns/test_gns_defaults.conf new file mode 100644 index 000000000..762c9641b --- /dev/null +++ b/src/gns/test_gns_defaults.conf @@ -0,0 +1,75 @@ +[PATHS] +SERVICEHOME = /tmp/test-gnunet-testing/ +DEFAULTCONFIG = test_testing_defaults.conf + +[resolver] +PORT = 2564 + +[transport] +PORT = 2565 +PLUGINS = tcp + +[arm] +PORT = 2566 +DEFAULTSERVICES = + +[statistics] +PORT = 2567 + +[transport-tcp] +PORT = 2568 +BINDTO = 127.0.0.1 + +[peerinfo] +PORT = 2569 + +[core] +PORT = 2570 + +[testing] +NUM_PEERS = 5 +WEAKRANDOM = YES +F2F = YES +HOSTKEYSFILE = ../../contrib/testing_hostkeys.dat + +[dht] +AUTOSTART = NO + +[nat] +DISABLEV6 = YES +ENABLE_UPNP = NO +BEHIND_NAT = NO +ALLOW_NAT = NO +INTERNAL_ADDRESS = 127.0.0.1 +EXTERNAL_ADDRESS = 127.0.0.1 +USE_LOCALADDR = NO + +[dns] +AUTOSTART = NO + +[nse] +AUTOSTART = NO + +[mesh] +AUTOSTART = NO + +[datastore] +AUTOSTART = NO + +[fs] +AUTOSTART = NO + +[dv] +AUTOSTART = NO + +[chat] +AUTOSTART = NO + +[vpn] +AUTOSTART = NO + +[gns] +AUTOSTART = NO + +[namestore] +AUTOSTART = NO \ No newline at end of file diff --git a/src/gns/test_gns_dht_alice.conf b/src/gns/test_gns_dht_alice.conf new file mode 100644 index 000000000..98f176796 --- /dev/null +++ b/src/gns/test_gns_dht_alice.conf @@ -0,0 +1,92 @@ +@INLINE@ test_gns_defaults.conf +[PATHS] +SERVICEHOME = /tmp/test-gnunet-gns-alice/ +DEFAULTCONFIG = test_gns_dht_alice.conf + +[transport-tcp] +PORT = 32568 + +[dht] +UNIXPATH = /tmp/gnunet-alice-service-dht.sock +DEBUG = NO +AUTOSTART = YES +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +HOSTNAME = localhost +PORT = 2101 +BINARY = gnunet-service-dht + +[block] +plugins = dht test gns + +[dhtcache] +QUOTA = 1 MB +DATABASE = sqlite + +[arm] +PORT = 12566 +DEFAULTSERVICES = core namstore gns +UNIXPATH = /tmp/gnunet-alice-service-arm.sock + +[statistics] +PORT = 12567 +UNIXPATH = /tmp/gnunet-alice-service-statistics.sock + +[resolver] +PORT = 12564 +UNIXPATH = /tmp/gnunet-alice-service-resolver.sock + +[peerinfo] +PORT = 12569 +UNIXPATH = /tmp/gnunet-alice-service-peerinfo.sock + +[transport] +PORT = 12565 +UNIXPATH = /tmp/gnunet-alice-service-transport.sock + +[core] +PORT = 12570 +UNIXPATH = /tmp/gnunet-alice-service-core.sock + +[ats] +PORT = 12571 +UNIXPATH = /tmp/gnunet-alice-service-ats.sock + +[dns] +UNIXPATH = /tmp/gnunet-alice-service-dns.sock +PORT = 12369 +AUTOSTART = YES +DNS_EXIT = 8.8.8.8 + +[gns] +PORT = 12370 +#PREFIX = valgrind -v --leak-check=full --track-origins=yes. +AUTOSTART = YES +BINARY = gnunet-service-gns +ZONEKEY = testkeys/KAILNI4SSH8M6QR6S8QRSGBBLMA8377HL6F60TEMO7S7TT1OR8CG.zkey +HIJACK_DNS = YES +UNIXPATH = /tmp/gnunet-service-gns-alice.sock +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +AUTO_IMPORT_PKEY = NO +MAX_PARALLEL_BACKGROUND_QUERIES = 10 +DEFAULT_LOOKUP_TIMEOUT = 60 + +[namestore] +PORT = 12371 +AUTOSTART = YES +UNIXPATH = /tmp/gnunet-service-namestore-alice.sock +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-namestore +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +DATABASE = sqlite +ZONEFILE_DIRECTORY = testkeys/ + +[namestore-sqlite] +FILENAME = testdb/sqlite-alice.db + diff --git a/src/gns/test_gns_dht_bob.conf b/src/gns/test_gns_dht_bob.conf new file mode 100644 index 000000000..72dc21a10 --- /dev/null +++ b/src/gns/test_gns_dht_bob.conf @@ -0,0 +1,92 @@ +@INLINE@ test_gns_defaults.conf +[PATHS] +SERVICEHOME = /tmp/test-gnunet-gns-bob/ +DEFAULTCONFIG = test_gns_dht_bob.conf + +[transport-tcp] +PORT = 22568 + +[dht] +UNIXPATH = /tmp/gnunet-bob-service-dht.sock +DEBUG = NO +AUTOSTART = YES +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +HOSTNAME = localhost +PORT = 2102 +BINARY = gnunet-service-dht + +[block] +plugins = dht test gns + +[dhtcache] +QUOTA = 1 MB +DATABASE = sqlite + +[arm] +PORT = 22566 +DEFAULTSERVICES = core namestore gns +UNIXPATH = /tmp/gnunet-bob-service-arm.sock + +[statistics] +PORT = 22567 +UNIXPATH = /tmp/gnunet-bob-service-statistics.sock + +[resolver] +PORT = 22564 +UNIXPATH = /tmp/gnunet-bob-service-resolver.sock + +[peerinfo] +PORT = 22569 +UNIXPATH = /tmp/gnunet-bob-service-peerinfo.sock + +[transport] +PORT = 22565 +UNIXPATH = /tmp/gnunet-bob-service-transport.sock + +[core] +PORT = 22570 +UNIXPATH = /tmp/gnunet-bob-service-core.sock + +[ats] +PORT = 22571 +UNIXPATH = /tmp/gnunet-bob-service-ats.sock + +[dns] +UNIXPATH = /tmp/gnunet-bob-service-dns.sock +PORT = 22369 +AUTOSTART = YES +DNS_EXIT = 8.8.8.8 + +[gns] +PORT = 22370 +#PREFIX = valgrind -v --leak-check=full --track-origins=yes. +AUTOSTART = YES +BINARY = gnunet-service-gns +ZONEKEY = testkeys/KRPVFMVBFKEGUS6KL8SFPEUMORFPP9ERE6AC98KO9NADBMPF7TOG.zkey +HIJACK_DNS = NO +UNIXPATH = /tmp/gnunet-service-gns-bob.sock +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +AUTO_IMPORT_PKEY = NO +MAX_PARALLEL_BACKGROUND_QUERIES = 10 +DEFAULT_LOOKUP_TIMEOUT = 5 + +[namestore] +PORT = 22371 +AUTOSTART = YES +UNIXPATH = /tmp/gnunet-service-namestore-bob.sock +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-namestore +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +DATABASE = sqlite +ZONEFILE_DIRECTORY = testkeys/ + +[namestore-sqlite] +FILENAME = testdb/sqlite-bob.db + diff --git a/src/gns/test_gns_dht_dave.conf b/src/gns/test_gns_dht_dave.conf new file mode 100644 index 000000000..5f0b20a8c --- /dev/null +++ b/src/gns/test_gns_dht_dave.conf @@ -0,0 +1,92 @@ +@INLINE@ test_gns_defaults.conf +[PATHS] +SERVICEHOME = /tmp/test-gnunet-gns-dave/ +DEFAULTCONFIG = test_gns_dht_dave.conf + +[transport-tcp] +PORT = 32568 + +[dht] +UNIXPATH = /tmp/gnunet-service-dht-dave.sock +DEBUG = NO +AUTOSTART = YES +ACCEPT_FROM6 = ::1; +ACCEPT_FROM = 127.0.0.1; +HOSTNAME = localhost +PORT = 2103 +BINARY = gnunet-service-dht + +[block] +plugins = dht test gns + +[dhtcache] +QUOTA = 1 MB +DATABASE = sqlite + +[arm] +PORT = 32566 +DEFAULTSERVICES = core namestore gns +UNIXPATH = /tmp/gnunet-dave-service-arm.sock + +[statistics] +PORT = 32567 +UNIXPATH = /tmp/gnunet-dave-service-statistics.sock + +[resolver] +PORT = 32564 +UNIXPATH = /tmp/gnunet-dave-service-resolver.sock + +[peerinfo] +PORT = 32569 +UNIXPATH = /tmp/gnunet-dave-service-peerinfo.sock + +[transport] +PORT = 32565 +UNIXPATH = /tmp/gnunet-dave-service-transport.sock + +[core] +PORT = 32570 +UNIXPATH = /tmp/gnunet-dave-service-core.sock + +[ats] +PORT = 32571 +UNIXPATH = /tmp/gnunet-dave-service-ats.sock + +[dns] +UNIXPATH = /tmp/gnunet-service-dns-dave.sock +PORT = 32369 +AUTOSTART = YES +DNS_EXIT = 8.8.8.8 + +[gns] +PORT = 32370 +#PREFIX = valgrind -v --leak-check=full --track-origins=yes. +AUTOSTART = YES +BINARY = gnunet-service-gns +ZONEKEY = testkeys/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey +HIJACK_DNS = NO +UNIXPATH = /tmp/gnunet-service-gns-dave.sock +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +AUTO_IMPORT_PKEY = NO +MAX_PARALLEL_BACKGROUND_QUERIES = 10 +DEFAULT_LOOKUP_TIMEOUT = 5 + +[namestore] +PORT = 32371 +AUTOSTART = YES +UNIXPATH = /tmp/gnunet-service-namestore-dave.sock +UNIX_MATCH_UID = YES +UNIX_MATCH_GID = YES +HOSTNAME = localhost +HOME = $SERVICEHOME +CONFIG = $DEFAULTCONFIG +BINARY = gnunet-service-namestore +ACCEPT_FROM = 127.0.0.1; +ACCEPT_FROM6 = ::1; +DATABASE = sqlite +ZONEFILE_DIRECTORY = testkeys/ + +[namestore-sqlite] +FILENAME = testdb/sqlite-dave.db + diff --git a/src/gns/test_gns_twopeer.c b/src/gns/test_gns_dht_threepeer.c similarity index 60% rename from src/gns/test_gns_twopeer.c rename to src/gns/test_gns_dht_threepeer.c index 8ebb9611b..7d8ed6c6b 100644 --- a/src/gns/test_gns_twopeer.c +++ b/src/gns/test_gns_dht_threepeer.c @@ -18,25 +18,17 @@ Boston, MA 02111-1307, USA. */ /** - * @file gns/test_gns_twopeer.c - * @brief base testcase for testing DHT service with - * two running peers. + * @file gns/test_gns_dht_threepeer.c + * @brief tests dht lookup over 3 peers + * + * topology: + * alice <----> bob <-----> dave + * + * alice queries for www.buddy.bob.gnunet * - * This testcase starts peers using the GNUNET_TESTING_daemons_start - * function call. On peer start, connects to the peers DHT service - * by calling GNUNET_DHT_connected. Once notified about all peers - * being started (by the peers_started_callback function), calls - * GNUNET_TESTING_connect_topology, which connects the peers in a - * "straight line" topology. On notification that all peers have - * been properly connected, calls the do_get function which initiates - * a GNUNET_DHT_get from the *second* peer. Once the GNUNET_DHT_get - * function starts, runs the do_put function to insert data at the first peer. - * If the GET is successful, schedules finish_testing - * to stop the test and shut down peers. If GET is unsuccessful - * after GET_TIMEOUT seconds, prints an error message and shuts down - * the peers. */ #include "platform.h" +#include "gnunet_disk_lib.h" #include "gnunet_testing_lib.h" #include "gnunet_core_service.h" #include "gnunet_dht_service.h" @@ -55,6 +47,9 @@ /* If number of peers not in config file, use this number */ #define DEFAULT_NUM_PEERS 2 +#define TEST_DOMAIN "www.buddy.bob.gnunet" +#define TEST_IP "1.1.1.1" + /* Globals */ /** @@ -74,6 +69,7 @@ static unsigned long long peers_left; struct GNUNET_TESTING_Daemon *d1; struct GNUNET_TESTING_Daemon *d2; +struct GNUNET_TESTING_Daemon *d3; /** @@ -103,7 +99,11 @@ GNUNET_SCHEDULER_TaskIdentifier bob_task; /* Global return value (0 for success, anything else for failure) */ static int ok; -int bob_online, alice_online; +int bob_online, alice_online, dave_online; + +struct GNUNET_CONFIGURATION_Handle *cfg_alice; +struct GNUNET_CONFIGURATION_Handle *cfg_bob; +struct GNUNET_CONFIGURATION_Handle *cfg_dave; /** * Check whether peers successfully shut down. @@ -126,13 +126,17 @@ static void finish_testing (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { ok = 0; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n"); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down alice!\n"); GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL, GNUNET_YES, GNUNET_NO); - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer2!\n"); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down bob!\n"); GNUNET_TESTING_daemon_stop (d2, TIMEOUT, &shutdown_callback, NULL, GNUNET_YES, GNUNET_NO); - GNUNET_SCHEDULER_cancel(bob_task); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down dave\n"); + GNUNET_TESTING_daemon_stop (d3, TIMEOUT, &shutdown_callback, NULL, + GNUNET_YES, GNUNET_NO); + GNUNET_DISK_file_copy ("testdb/sqlite-alice.db.bak", + "testdb/sqlite-alice.db.bak"); GNUNET_SCHEDULER_cancel(die_task); } @@ -149,6 +153,10 @@ end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) if (d2 != NULL) GNUNET_TESTING_daemon_stop (d2, TIMEOUT, &shutdown_callback, NULL, GNUNET_YES, GNUNET_NO); +; + if (d3 != NULL) + GNUNET_TESTING_daemon_stop (d3, TIMEOUT, &shutdown_callback, NULL, + GNUNET_YES, GNUNET_NO); } /** @@ -161,49 +169,39 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Failing test with error: `%s'!\n", (char *) cls); - GNUNET_SCHEDULER_cancel(bob_task); GNUNET_SCHEDULER_add_now (&end_badly_cont, NULL); ok = 1; } static void -do_lookup(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) +commence_testing(void) { + struct hostent *he; + struct in_addr a; + char* addr; + + he = gethostbyname (TEST_DOMAIN); + + if (he) + { + GNUNET_log(GNUNET_ERROR_TYPE_INFO, "name: %s\n", he->h_name); + while (*he->h_addr_list) + { + bcopy(*he->h_addr_list++, (char *) &a, sizeof(a)); + addr = inet_ntoa(a); + GNUNET_log(GNUNET_ERROR_TYPE_INFO, "address: %s\n", addr); + if (strcmp(addr, TEST_IP) == 0) + ok = 0; + } + } + else + ok = 1; //do lookup here GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30), &finish_testing, NULL); } -static void -gns_started(void *cls, const struct GNUNET_PeerIdentity *id, - const struct GNUNET_CONFIGURATION_Handle *cfg, - struct GNUNET_TESTING_Daemon *d, const char *emsg) -{ - if (NULL != emsg) - { - if (d == d1) - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "GNS failed to start alice\n"); - else - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "GNS failed to start bob\n"); - return; - } - if (d == d1) - { - /* start gns for bob */ - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "GNS started on alice\n"); - GNUNET_TESTING_daemon_start_service (d2, "gns", TIMEOUT, &gns_started, - NULL); - return; - } - - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "GNS started on bob\n"); - - /* start the lookup tests */ - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply - (GNUNET_TIME_UNIT_SECONDS, 1), - &do_lookup, NULL); -} /** * This function is called whenever a connection attempt is finished between two of @@ -251,10 +249,8 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *first, #endif GNUNET_SCHEDULER_cancel (die_task); die_task = - GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, "from test lookup"); - - /* start gns for alice */ - GNUNET_TESTING_daemon_start_service (d1, "gns", TIMEOUT, &gns_started, NULL); + GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, "from connect"); + commence_testing(); } else if (total_connections + failed_connections == expected_connections) @@ -264,55 +260,49 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *first, GNUNET_SCHEDULER_add_now (&end_badly, "from topology_callback (too many failed connections)"); } + else + { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Connecting peers dave, bob\n"); + GNUNET_TESTING_daemons_connect (d3, d2, TIMEOUT, 5, 1, + ¬ify_connect, NULL); + } } /** * Set up some data, and call API PUT function */ static void -alice_idle (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) +connect_ab (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { - alice_online = 1; - if (!bob_online) - { - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply - (GNUNET_TIME_UNIT_SECONDS, 2), - &alice_idle, NULL); - return; - } - - GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Connecting peers\n"); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Connecting peers alice, bob\n"); GNUNET_TESTING_daemons_connect (d1, d2, TIMEOUT, 5, 1, ¬ify_connect, NULL); } + static void -bob_idle (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) +dave_started (void *cls, const struct GNUNET_PeerIdentity *id, + const struct GNUNET_CONFIGURATION_Handle *cfg, + struct GNUNET_TESTING_Daemon *d, const char *emsg) { - /* he's lazy FIXME forever */ - bob_online = 1; - bob_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply - (GNUNET_TIME_UNIT_SECONDS, 20), - &bob_idle, NULL); + if (emsg != NULL) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failed to start daemon with error: `%s'\n", emsg); + return; + } + GNUNET_assert (id != NULL); + + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply + (GNUNET_TIME_UNIT_SECONDS, 2), + &connect_ab, NULL); } - -/** - * Callback which is called whenever a peer is started (as a result of the - * GNUNET_TESTING_daemons_start call. - * - * @param cls closure argument given to GNUNET_TESTING_daemons_start - * @param id the GNUNET_PeerIdentity of the started peer - * @param cfg the configuration for this specific peer (needed to connect - * to the DHT) - * @param d the handle to the daemon started - * @param emsg NULL if peer started, non-NULL on error - */ static void -alice_started (void *cls, const struct GNUNET_PeerIdentity *id, +bob_started (void *cls, const struct GNUNET_PeerIdentity *id, const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_TESTING_Daemon *d, const char *emsg) { @@ -324,13 +314,27 @@ alice_started (void *cls, const struct GNUNET_PeerIdentity *id, } GNUNET_assert (id != NULL); - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply - (GNUNET_TIME_UNIT_SECONDS, 2), - &alice_idle, NULL); + //Start bob + d3 = GNUNET_TESTING_daemon_start(cfg_dave, TIMEOUT, GNUNET_NO, NULL, NULL, 0, + NULL, NULL, NULL, &dave_started, NULL); + } + + +/** + * Callback which is called whenever a peer is started (as a result of the + * GNUNET_TESTING_daemons_start call. + * + * @param cls closure argument given to GNUNET_TESTING_daemons_start + * @param id the GNUNET_PeerIdentity of the started peer + * @param cfg the configuration for this specific peer (needed to connect + * to the DHT) + * @param d the handle to the daemon started + * @param emsg NULL if peer started, non-NULL on error + */ static void -bob_started (void *cls, const struct GNUNET_PeerIdentity *id, +alice_started (void *cls, const struct GNUNET_PeerIdentity *id, const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_TESTING_Daemon *d, const char *emsg) { @@ -342,9 +346,10 @@ bob_started (void *cls, const struct GNUNET_PeerIdentity *id, } GNUNET_assert (id != NULL); - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply - (GNUNET_TIME_UNIT_SECONDS, 2), - &bob_idle, NULL); + //Start bob + d2 = GNUNET_TESTING_daemon_start(cfg_bob, TIMEOUT, GNUNET_NO, NULL, NULL, 0, + NULL, NULL, NULL, &bob_started, NULL); + } static void @@ -352,12 +357,6 @@ run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) { - struct GNUNET_NAMESTORE_Handle* namestore_handle; - struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey, bob_pkey; - struct GNUNET_CRYPTO_RsaPrivateKey *alice_key, *bob_key; - char* bob_keyfile; - char* alice_keyfile; - /* Get path from configuration file */ if (GNUNET_YES != GNUNET_CONFIGURATION_get_value_string (cfg, "paths", "servicehome", @@ -376,95 +375,22 @@ run (void *cls, char *const *args, const char *cfgfile, /* Set peers_left so we know when all peers started */ peers_left = num_peers; - /* Somebody care to explain? */ - uint16_t port = 6000; - uint32_t upnum = 23; - uint32_t fdnum = 42; - /** - * Modify some config options for bob - * namely swap keys and disable dns hijacking + * Modify some config options for peers */ - struct GNUNET_CONFIGURATION_Handle *cfg2 = GNUNET_TESTING_create_cfg(cfg, - 23, &port, &upnum, - NULL, &fdnum); - - GNUNET_CONFIGURATION_set_value_string (cfg2, "paths", "servicehome", - "/tmp/test-gnunetd-gns-peer-2/"); - GNUNET_CONFIGURATION_set_value_string (cfg2, "gns", "HIJACK_DNS", - "NO"); - GNUNET_CONFIGURATION_set_value_string (cfg2, "gns", "ZONEKEY", - "/tmp/bobkey"); + cfg_alice = GNUNET_CONFIGURATION_create(); + GNUNET_CONFIGURATION_load (cfg_alice, "test_gns_dht_alice.conf"); + + cfg_bob = GNUNET_CONFIGURATION_create(); + GNUNET_CONFIGURATION_load (cfg_bob, "test_gns_dht_bob.conf"); - /* put records into namestore */ - namestore_handle = GNUNET_NAMESTORE_connect(cfg); - if (NULL == namestore_handle) - { - GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n"); - ok = -1; - return; - } + cfg_dave = GNUNET_CONFIGURATION_create(); + GNUNET_CONFIGURATION_load (cfg_dave, "test_gns_dht_dave.conf"); - if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "gns", - "ZONEKEY", - &alice_keyfile)) - { - GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to get alice's key from cfg\n"); - ok = -1; - return; - } + GNUNET_CONFIGURATION_load (cfg_alice, "test_gns_dht_alice.conf"); + GNUNET_CONFIGURATION_load (cfg_bob, "test_gns_dht_bob.conf"); + GNUNET_CONFIGURATION_load (cfg_dave, "test_gns_dht_dave.conf"); - if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg2, "gns", - "ZONEKEY", - &bob_keyfile)) - { - GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to get bob's key from cfg\n"); - ok = -1; - return; - } - - alice_key = GNUNET_CRYPTO_rsa_key_create_from_file (alice_keyfile); - bob_key = GNUNET_CRYPTO_rsa_key_create_from_file (bob_keyfile); - - GNUNET_CRYPTO_rsa_key_get_public (alice_key, &alice_pkey); - GNUNET_CRYPTO_rsa_key_get_public (bob_key, &bob_pkey); - - struct GNUNET_NAMESTORE_RecordData rd; - rd.data = &bob_pkey; - rd.expiration = GNUNET_TIME_absolute_get_forever (); - rd.data_size = sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded); - rd.record_type = GNUNET_GNS_RECORD_PKEY; - - GNUNET_NAMESTORE_record_create (namestore_handle, - alice_key, - "bob", - &rd, - NULL, - NULL); - - rd.data = &alice_pkey; - GNUNET_NAMESTORE_record_create (namestore_handle, - bob_key, - "alice", - &rd, - NULL, - NULL); - - char* ip = "127.0.0.1"; - struct in_addr *web = GNUNET_malloc(sizeof(struct in_addr)); - GNUNET_assert(1 == inet_pton (AF_INET, ip, web)); - - rd.data_size = sizeof(struct in_addr); - rd.data = web; - rd.record_type = GNUNET_DNSPARSER_TYPE_A; - - GNUNET_NAMESTORE_record_create (namestore_handle, - bob_key, - "www", - &rd, - NULL, - NULL); - /* Set up a task to end testing if peer start fails */ die_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, @@ -472,16 +398,14 @@ run (void *cls, char *const *args, const char *cfgfile, alice_online = 0; bob_online = 0; - expected_connections = 1; + dave_online = 0; + expected_connections = 2; /* Start alice */ - d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0, + d1 = GNUNET_TESTING_daemon_start(cfg_alice, TIMEOUT, GNUNET_NO, NULL, NULL, 0, NULL, NULL, NULL, &alice_started, NULL); - //Start bob - d2 = GNUNET_TESTING_daemon_start(cfg2, TIMEOUT, GNUNET_NO, NULL, NULL, 0, - NULL, NULL, NULL, &bob_started, NULL); } diff --git a/src/gns/testdb/sqlite-alice.db b/src/gns/testdb/sqlite-alice.db new file mode 100644 index 0000000000000000000000000000000000000000..3a428a8819831d902c86fea777dc0dcd7f6d89ab GIT binary patch literal 13312 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 literal 0 HcmV?d00001 diff --git a/src/gns/testkeys/KAILNI4SSH8M6QR6S8QRSGBBLMA8377HL6F60TEMO7S7TT1OR8CG.zkey b/src/gns/testkeys/KAILNI4SSH8M6QR6S8QRSGBBLMA8377HL6F60TEMO7S7TT1OR8CG.zkey new file mode 100644 index 0000000000000000000000000000000000000000..54dcd2d505f3476c68857550460effae6d3a5b46 GIT binary patch literal 914 zcmV;D18w{Rk^uk!0s#O3fB=9100028q0BI>`P&P{77{Vgxnp7GPhD5EVbXr zWuiQ-$APx%b(qXinQuqRkqp;wH9!c}9b;rLHw;}Gn>frTISk1Tj9 z;|-S`0;vM^UZ&XBE-Z|mZ_P&m0V8tAJszOqnFi@`lPGY_8$~HZ!kpt*f z`y1lwXCi*D-H#1TViJ<@KCd|EdngRh-Y#-j%V_)tn*?V6J{GQaQFojI<_Vp>LS*xt zHc6akM-d_eoMl*l*b+CsgVdM9uINuZ*ICQ36-NAhoc=ef{KA>Ix0U2 z@|O2-&pBK4pwmkr{zIhwgofO80LoE6}SbEoFCHvj+t literal 0 HcmV?d00001 diff --git a/src/gns/testkeys/KRPVFMVBFKEGUS6KL8SFPEUMORFPP9ERE6AC98KO9NADBMPF7TOG.zkey b/src/gns/testkeys/KRPVFMVBFKEGUS6KL8SFPEUMORFPP9ERE6AC98KO9NADBMPF7TOG.zkey new file mode 100644 index 0000000000000000000000000000000000000000..8407313af3cb15e05ce2d537bcb288714578e6ab GIT binary patch literal 914 zcmV;D18w{Rk^uk!0s#O3fB=910002Z58q`kj1Gp9p84#Sn8gb~VGPQdCHiL>HL}3k(hQQW9(x4iA{3KsFa4d+co=xjs_6 z%_T0?kd$(CKWI{RFM2ic^%67hDk6#Ud{lIvU}fR^q2*KtV(4)ZUkG|=Ye%Rs z@yqg55J05=&@9~1HcY=dcjgpGJc0uluHhvy>5&X?A0leTG9_7CR!XVipSTbrU16(W zH)FO>EOmG%YAeU=mJAWGL0)pIdxz4k_-QtmM1+Z~)a%t>8(vwPC&M)y7dc)Emr)?F z1(Y6o>WF7p+3$DV**pbIQT}Z0llX*3_GqiF?iYmkJAE2TXba%CK`x$>FoY()#*I&L zaCZUz8^DGD)>NN@IB(&rrxn9TzU`7N02>>c=f_~@v7>b4kepM#%R<Y|BApHvz2V%;YtB@?q`_UMvB{Kn zA6)QiRBy@=1~I~XR$A)&w@El&mW-2c=w(*kbAE6^NrFus0`HE~jaUngga#fC$Z`<+ zq=_*(I2@lEdT(Scs0K$^GkD@aFph=aPV^2wSS_u15d|sgS)^77Oa;T{^zvjQ&iU1kx|Ry?T_Mppu>R1VxQNX1y;LmR3Nz z6~`L&M$m&#%BaaaRJZr%#4>-}!>u0tV62qBSSgfikwCQ=y;A;9v5C_O!baL74Bow2 oK?Wr0gG1JNh;j8LM&bfm~jujJb|5ucY*^Po&jPeDkTr|yi)=G(O8cohISlI>G=)~ za@(C6V^m#*Xid*bc^&Hme*N46RR_v#qUz9H;jlqGreu%`aRC`5C=K+x$KAIp#vWTW855=XQ6F9B**Yf-?ueXj3=c&$JR4P` zto%>dr{V)!ULbU+?fb_`6v%@C0Si0eT6>B8>l>Vi2*g8(RE@m<`42ZaHLQSw1dlXX|&#N?~Pqt6q6F}L4lG*0P&^h1rCse}&cD_>@ zC$GEZPWwW|Bm(Av=SWIk0Xc|~xJYo%(HHl^pAL;v%e63KQO8{Nu?jaJIu->xVyNrr z$R;|xB*-p3(>FxA7xA3OSv9B8bLI3oTxs0N7A{BAZ-unZQRXD61Cw!P$JG+aO@vzY z5Y`py+79+N%f;DmJAAsadDf^jDu1QxY2y6fxu7o0IsC$BYigInFPuDjNQ_`KK4v& zBfLi1Y4iNs(wTdi<;3o-aZ-*Eqde}PQjs*l;F4OM5ht_*C!