summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/opentracker.c b/opentracker.c
index d45fcf8..2d2058b 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -494,6 +494,7 @@ static void help( char *name ) {
494 "\t-p serverport\tspecify tcp port to bind to (default: 6969, you may specify more than one)\n" 494 "\t-p serverport\tspecify tcp port to bind to (default: 6969, you may specify more than one)\n"
495 "\t-P serverport\tspecify udp port to bind to (default: 6969, you may specify more than one)\n" 495 "\t-P serverport\tspecify udp port to bind to (default: 6969, you may specify more than one)\n"
496 "\t-d serverdir\tspecify directory containing white- or black listed torrent info_hashes (default: \".\")\n" 496 "\t-d serverdir\tspecify directory containing white- or black listed torrent info_hashes (default: \".\")\n"
497 "\t-A adminip\tbless an ip address as admin address (e.g. to allow snycs from this address)\n"
497 "\nExample: ./opentracker -i 127.0.0.1 -p 6969 -P 6969 -i 10.1.1.23 -p 2710 -p 80\n" 498 "\nExample: ./opentracker -i 127.0.0.1 -p 6969 -P 6969 -i 10.1.1.23 -p 2710 -p 80\n"
498); 499);
499} 500}
@@ -563,7 +564,7 @@ static void handle_accept( const int64 serversocket ) {
563 byte_zero( h, sizeof( struct http_data ) ); 564 byte_zero( h, sizeof( struct http_data ) );
564 memmove( h->ip, ip, sizeof( ip ) ); 565 memmove( h->ip, ip, sizeof( ip ) );
565 566
566 if( ntohl(*(ot_dword*)&h->ip) == *(ot_dword*)g_adminip ) 567 if( !byte_diff( &h->ip, 4, g_adminip ) )
567 h->blessed = 1; 568 h->blessed = 1;
568 569
569 io_setcookie( i, h ); 570 io_setcookie( i, h );