diff options
| author | erdgeist <> | 2007-03-29 15:04:06 +0000 |
|---|---|---|
| committer | erdgeist <> | 2007-03-29 15:04:06 +0000 |
| commit | 4e9523c48905bdc6b384a403012c6e320e9d8f47 (patch) | |
| tree | 1172ec1415e0b4bdfa3216a64775bf9a5900b2ab | |
| parent | 32ba028814d46796f8ffe011518697dfba0e0dad (diff) | |
Fix endianess issue with blessed ips. Document -A feature.
| -rw-r--r-- | opentracker.c | 3 |
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 ); |
