summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--ot_stats.c6
-rw-r--r--ot_udp.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index ed258e6..b4bb5d2 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ BINDIR?=$(PREFIX)/bin
35#FEATURES+=-DWANT_MODEST_FULLSCRAPES 35#FEATURES+=-DWANT_MODEST_FULLSCRAPES
36#FEATURES+=-DWANT_SPOT_WOODPECKER 36#FEATURES+=-DWANT_SPOT_WOODPECKER
37#FEATURES+=-DWANT_SYSLOGS 37#FEATURES+=-DWANT_SYSLOGS
38#FEATURES+=-DWANT_DEV_RANDOM 38FEATURES+=-DWANT_DEV_RANDOM
39FEATURES+=-DWANT_FULLSCRAPE 39FEATURES+=-DWANT_FULLSCRAPE
40 40
41#FEATURES+=-D_DEBUG_HTTPERROR 41#FEATURES+=-D_DEBUG_HTTPERROR
diff --git a/ot_stats.c b/ot_stats.c
index 5e7a9f3..d37424c 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -48,6 +48,7 @@ static unsigned long long ot_overall_tcp_successfulannounces = 0;
48static unsigned long long ot_overall_udp_successfulannounces = 0; 48static unsigned long long ot_overall_udp_successfulannounces = 0;
49static unsigned long long ot_overall_tcp_successfulscrapes = 0; 49static unsigned long long ot_overall_tcp_successfulscrapes = 0;
50static unsigned long long ot_overall_udp_successfulscrapes = 0; 50static unsigned long long ot_overall_udp_successfulscrapes = 0;
51static unsigned long long ot_overall_udp_connectionidmissmatches = 0;
51static unsigned long long ot_overall_tcp_connects = 0; 52static unsigned long long ot_overall_tcp_connects = 0;
52static unsigned long long ot_overall_udp_connects = 0; 53static unsigned long long ot_overall_udp_connects = 0;
53static unsigned long long ot_overall_completed = 0; 54static unsigned long long ot_overall_completed = 0;
@@ -59,7 +60,6 @@ static char * ot_failed_request_names[] = { "302 Redirect", "400 Par
59static unsigned long long ot_renewed[OT_PEER_TIMEOUT]; 60static unsigned long long ot_renewed[OT_PEER_TIMEOUT];
60static unsigned long long ot_overall_sync_count; 61static unsigned long long ot_overall_sync_count;
61static unsigned long long ot_overall_stall_count; 62static unsigned long long ot_overall_stall_count;
62static unsigned long long g_stats_connid_missmatches;
63 63
64static time_t ot_start_time; 64static time_t ot_start_time;
65 65
@@ -539,7 +539,7 @@ static size_t stats_return_everything( char * reply ) {
539 r += sprintf( r, " <completed>\n <count>%llu</count>\n </completed>\n", ot_overall_completed ); 539 r += sprintf( r, " <completed>\n <count>%llu</count>\n </completed>\n", ot_overall_completed );
540 r += sprintf( r, " <connections>\n" ); 540 r += sprintf( r, " <connections>\n" );
541 r += sprintf( r, " <tcp>\n <accept>%llu</accept>\n <announce>%llu</announce>\n <scrape>%llu</scrape>\n </tcp>\n", ot_overall_tcp_connections, ot_overall_tcp_successfulannounces, ot_overall_udp_successfulscrapes ); 541 r += sprintf( r, " <tcp>\n <accept>%llu</accept>\n <announce>%llu</announce>\n <scrape>%llu</scrape>\n </tcp>\n", ot_overall_tcp_connections, ot_overall_tcp_successfulannounces, ot_overall_udp_successfulscrapes );
542 r += sprintf( r, " <udp>\n <overall>%llu</overall>\n <connect>%llu</connect>\n <announce>%llu</announce>\n <scrape>%llu</scrape>\n </udp>\n", ot_overall_udp_connections, ot_overall_udp_connects, ot_overall_udp_successfulannounces, ot_overall_udp_successfulscrapes ); 542 r += sprintf( r, " <udp>\n <overall>%llu</overall>\n <connect>%llu</connect>\n <announce>%llu</announce>\n <scrape>%llu</scrape>\n <missmatch>%llu</missmatch>\n </udp>\n", ot_overall_udp_connections, ot_overall_udp_connects, ot_overall_udp_successfulannounces, ot_overall_udp_successfulscrapes, ot_overall_udp_connectionidmissmatches );
543 r += sprintf( r, " <livesync>\n <count>%llu</count>\n </livesync>\n", ot_overall_sync_count ); 543 r += sprintf( r, " <livesync>\n <count>%llu</count>\n </livesync>\n", ot_overall_sync_count );
544 r += sprintf( r, " </connections>\n" ); 544 r += sprintf( r, " </connections>\n" );
545 r += sprintf( r, " <debug>\n" ); 545 r += sprintf( r, " <debug>\n" );
@@ -725,7 +725,7 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event
725 break; 725 break;
726#endif 726#endif
727 case EVENT_CONNID_MISSMATCH: 727 case EVENT_CONNID_MISSMATCH:
728 ++g_stats_connid_missmatches; 728 ++ot_overall_udp_connectionidmissmatches;
729 default: 729 default:
730 break; 730 break;
731 } 731 }
diff --git a/ot_udp.c b/ot_udp.c
index b79bc76..603a4e2 100644
--- a/ot_udp.c
+++ b/ot_udp.c
@@ -38,7 +38,7 @@ static void udp_generate_rijndael_round_key() {
38static void udp_make_connectionid( uint32_t connid[4], const ot_ip6 remoteip ) { 38static void udp_make_connectionid( uint32_t connid[4], const ot_ip6 remoteip ) {
39 uint32_t plain[4], crypt[4]; 39 uint32_t plain[4], crypt[4];
40 int age, i; 40 int age, i;
41 41for( i=0; i<16; ++i ) fprintf( stderr, "%02uX ", (uint8_t)remoteip[i] ); fprintf(stderr, "\n" );
42 if( g_now_minutes + 60 > g_hour_of_the_key ) { 42 if( g_now_minutes + 60 > g_hour_of_the_key ) {
43 g_hour_of_the_key = g_now_minutes; 43 g_hour_of_the_key = g_now_minutes;
44 g_key_of_the_hour[1] = g_key_of_the_hour[0]; 44 g_key_of_the_hour[1] = g_key_of_the_hour[0];